Vulnerabilities in pkg:npm/@hapi/content

PACKAGE
Advisory Identifier: GHSA-36hh-x5p5-jgc8
Advisory Summary

CVE-2026-44974 is a HIGH @hapi/content header parser has a vulnerability (CWE-436: Interpretation Conflict) affecting @hapi/content libraries in the npm ecosystem. The issue involves @hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters. Remediation is available by upgrading affected packages to version 6.0.2.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@hapi/content

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@hapi/content. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-36hh-x5p5-jgc8 CVE-2026-44974 HIGH @hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters
GHSA-jg4p-7fhp-p32p CVE-2026-35213 HIGH @hapi/content: Regular Expression Denial of Service (ReDoS) in HTTP header parsing
GHSA-3wqh-h42r-x8fq - HIGH Denial of Service in @hapi/content

CVE-2026-44974 at a Glance

CVE Identifier CVE-2026-44974
GHSA Identifier GHSA-36hh-x5p5-jgc8
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-436: Interpretation Conflict
Affected Product @hapi/content
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-44974

To remediate this vulnerability, upgrade all affected @hapi/content dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@hapi/content fixed: 6.0.2
npm install @hapi/content@6.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @hapi/content

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-44974, inspect your project dependencies using npm:

npm ls @hapi/content

Analyze the terminal output to locate any version of @hapi/content in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.2), your application is affected.

Note: The npm ls @hapi/content command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In @hapi/content, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://www.rfc-editor.org/rfc/rfc6266#section-4.1) - [RFC 7231 §3.1.1.1 — Content-Type syntax](https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.1) - [RFC 7230 §3.2.6 — token character set](https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6)

CVE-2026-44974 Affected @hapi/content Versions

1 component(s)
Fixed Versions:
6.0.2
Product / Package Ecosystem Affected Versions Fixed Version
@hapi/content
npm
< 6.0.2
6.0.2

References

Frequently Asked Questions

What is CVE-2026-44974?
CVE-2026-44974 is a security vulnerability in @hapi/content involving @hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters under CWE-436: Interpretation Conflict.
Which @hapi/content versions are affected?
Affected versions include releases prior to 6.0.2 across affected packages: @hapi/content.
What version fixes CVE-2026-44974?
Upgrading to 6.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @hapi/content affected?
Yes, @hapi/content is affected in releases prior to 6.0.2. Upgrade your dependency to 6.0.2 or later.
What CWE is associated with CVE-2026-44974?
CVE-2026-44974 is classified under CWE-436: Interpretation Conflict (Product A handles inputs or steps differently than Product B, which causes A to perform incorrect actions based on its perception of B's state.).
How can I check npm dependencies for CVE-2026-44974?
Run the dependency tree command: 'npm ls @hapi/content'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-36hh-x5p5-jgc8",
  "modified" : "2026-05-27T00:37:20Z",
  "published" : "2026-05-27T00:37:20Z",
  "aliases" : [ "CVE-2026-44974" ],
  "summary" : "@hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters",
  "details" : "### Impact\nThe two parsers resolved duplicates inconsistently and silently:\n- `Content.disposition()` retained the last occurrence of each parameter.\n- `Content.type()` retained the first occurrence of charset and boundary.\n\nEither 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:\n\n`Content-Disposition: form-data; name=\"file\"; filename=\"safe.txt\"; filename=\"shell.php\"`\n\n### Patches\nThe issue has been patched in 6.0.2.\n\n### Workarounds\nPre or post validate headers looking for duplicates.\n\n### Resources\n- [RFC 6266 §4.1 — Content-Disposition syntax](https://www.rfc-editor.org/rfc/rfc6266#section-4.1)\n- [RFC 7231 §3.1.1.1 — Content-Type syntax](https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.1)\n- [RFC 7230 §3.2.6 — token character set](https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@hapi/content"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/hapijs/content/security/advisories/GHSA-36hh-x5p5-jgc8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hapijs/content/commit/3850079550c191d25e3643dc82a6d61144db8c2f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hapijs/content"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-436" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-27T00:37:20Z",
    "nvd_published_at" : null
  }
}