@hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters
Description
Impact
The two parsers resolved duplicates inconsistently and silently: - Content.disposition() retained the last occurrence of each parameter. - Content.type() retained the first occurrence of charset and boundary.
Either behavior creates a parameter-smuggling primitive when another component in the request-processing chain (a WAF, reverse proxy, security filter, or alternate parser) resolves duplicates the opposite way. The primary attack vector is upload filename allowlist bypass:
Content-Disposition: form-data; name="file"; filename="safe.txt"; filename="shell.php"
Patches
The issue has been patched in 6.0.2.
Workarounds
Pre or post validate headers looking for duplicates.
### Resources - RFC 6266 §4.1 — Content-Disposition syntax - RFC 7231 §3.1.1.1 — Content-Type syntax - RFC 7230 §3.2.6 — token character set
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
@hapi/contentnpm | < 6.0.2 | 6.0.2 |
Affected products
13- Range: < 6.0.2
- osv-coords12 versionspkg:apk/chainguard/kibana-8.19pkg:apk/chainguard/kibana-8.19-bitnamipkg:apk/chainguard/kibana-8.19-iamguardedpkg:apk/chainguard/kibana-9.3pkg:apk/chainguard/kibana-9.3-iamguardedpkg:apk/chainguard/kibana-9.4pkg:apk/chainguard/kibana-9.4-iamguardedpkg:apk/chainguard/opensearch-dashboards-3pkg:apk/chainguard/opensearch-dashboards-3-fipspkg:apk/chainguard/wazuh-dashboardpkg:apk/chainguard/wazuh-dashboard-fipspkg:apk/wolfi/opensearch-dashboards-3
< 8.19.16-r3+ 11 more
- (no CPE)range: < 8.19.16-r3
- (no CPE)range: < 8.19.16-r3
- (no CPE)range: < 8.19.16-r3
- (no CPE)range: < 9.3.5-r0
- (no CPE)range: < 9.3.5-r0
- (no CPE)range: < 9.4.2-r0
- (no CPE)range: < 9.4.2-r0
- (no CPE)range: < 3.7.0-r2
- (no CPE)range: < 3.7.0-r2
- (no CPE)range: < 4.14.5-r3
- (no CPE)range: < 4.14.5-r3
- (no CPE)range: < 3.7.0-r2
Patches
Vulnerability mechanics
References
3News mentions
0No linked articles in our index yet.