# CVE-2026-48049: @hapi/inert: Static-file confinement bypass via sibling-prefix path

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 42% of CVEs (2026-11-30)
- Published: 2026-06-11T17:10:15.000Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-rcvq-m9j9-6f4g
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- hapijs inert: >= 4.0.0, < 7.1.1
- @hapi/inert (npm): from 4.0.0 before 7.1.1

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/hapijs/inert/security/advisories/GHSA-rcvq-m9j9-6f4g> (web)
- <https://github.com/hapijs/inert/pull/176> (web)
- <https://github.com/hapijs/inert/commit/bcceb761a43b9d1178eb6bd553e4ad2bb70494d9>
- <https://github.com/hapijs/inert/releases/tag/v7.1.1>
- <https://github.com/hapijs/inert/commit/a65e5b271b5c3405af463469959c5e052eb23a62> (web)
- <https://github.com/hapijs/inert> (package)

## Sources

- CVE List: [CVE-2026-48049](https://www.cve.org/CVERecord?id=CVE-2026-48049), CVE Terms of Use, modified 2026-07-21
- GitHub Advisory Database: [GHSA-rcvq-m9j9-6f4g](https://github.com/advisories/GHSA-rcvq-m9j9-6f4g), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-48049](https://nvd.nist.gov/vuln/detail/CVE-2026-48049), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-48049 · Whole record: https://cve.day/CVE-2026-48049.json · Rebuilt by cve.day 2026-11-25T22:59:28.589Z
