{"id":"CVE-2026-48049","published":"2026-07-17T21:03:16Z","modified":"2026-07-21T02:26:04Z","title":"@hapi/inert: Static-file confinement bypass via sibling-prefix path","vendor":"hapijs","product":"inert","tier":"tail","description":{"text":"@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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0059,"percentile":0.49141,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/hapijs/inert/security/advisories/GHSA-rcvq-m9j9-6f4g","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/hapijs/inert/pull/176","tags":["x_refsource_MISC"]},{"url":"https://github.com/hapijs/inert/commit/bcceb761a43b9d1178eb6bd553e4ad2bb70494d9","tags":["x_refsource_MISC"]},{"url":"https://github.com/hapijs/inert/releases/tag/v7.1.1","tags":["x_refsource_MISC"]}],"priority":{"score":13.5,"factors":[{"name":"EPSS percentile","points":9.83},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"hapijs","affectedVersions":[{"vendor":"hapijs","product":"inert","versions":[">= 4.0.0, < 7.1.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-07-21T02:25:52.865059Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@hapi/inert","vulnerableRanges":[">=4.0.0, <7.1.1"],"patched":["7.1.1"],"from":["GHSA-rcvq-m9j9-6f4g"],"provenance":"source"}],"summary":{"text":"The @hapi/inert package, which supplies static file and directory handlers for hapi.js, contains a confinement check that compares resolved paths using a raw string-prefix test, so a sibling directory whose name begins with the confined directory's name is wrongly accepted. An unauthenticated remote attacker can exploit this over the network with no user interaction and no special configuration beyond a static handler using the confine option, by requesting a path such as /..%2fstatic-secret/secret.txt to read files outside the intended directory.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:45:08Z"},"euvd":{"id":"EUVD-2026-45341","exploited":false,"provenance":"source"}}