CVE-2026-48049
published medium CVSS 3.1 · 5.3@hapi/inert: Static-file confinement bypass via sibling-prefix path
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| hapijs | — | inert>= 4.0.0, < 7.1.1 | Affected | Not stated | GitHub_M |
Description
@hapi/inert provides static file and directory handlers for hapi.js. From 4.0.0 to 7.1.0, @hapi/inert serves static files from a directory configured with path in the directory or file handlers or relativeTo for h.file(), with confinement enforced by the confine option, but the confinement check compared the resolved absolute path against the confine directory using a raw string-prefix test, so a sibling directory such as /app/static-secret next to /app/static was incorrectly accepted and could allow an unauthenticated remote attacker to read files via /..%2fstatic-secret/secret.txt. This issue is fixed in version 7.1.1.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| hapijs | inert | >= 4.0.0, < 7.1.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
4Provider assertions
2GitHub_M · cna
@hapi/inert: Static-file confinement bypass via sibling-prefix path
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e6b9327a490170cebab50462eac3685c7f1fd59c619a1655d64476cb4e92feff
- Ingested
- 23 Sep 2026, 09:17:17 UTC
- Source record
- Official CVE record