Path Traversal in @hapi/inert (CVE-2026-48049)
Summary
Path traversal in @hapi/inert (CVE-2026-48049). Risk of unauthorized operations or information disclosure. Exploitable via path. Mitigation: upgrade to 7.1.1 or later.
Original description
The description as published by the source.
@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.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-48049 has been found in @hapi/inert.
Attackers can target a specific entry point like path over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 5.3/10.
What to do: upgrade @hapi/inert to 7.1.1 or later.
If unsure, ask your IT team or search "@hapi/inert CVE-2026-48049" on the vendor's site.
CVE-2026-48049 (@hapi/inert) — CWE-22 / CVSS v3 5.3
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: path / directory / file / relativeTo
Patched: 7.1.1 — apply immediately
Workaround: For users who cannot upgrade immediately: ensure the directory served via inert has no sibling whose name starts with the same characters (for example, rename static-secret/ to secret/, or move it to a different parent directory).
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in @hapi/inert. Attackers reach the vulnerable code path via path without authentication.
Check the vendor advisory for the affected versions of @hapi/inert. Attack surface: path / directory / file / relativeTo.
Severity: Medium (CVSS 5.3/10). Risk of unauthorized operations or information disclosure.
Update to 7.1.1.
Workaround: For users who cannot upgrade immediately: ensure the directory served via inert has no sibling whose name starts with the same characters (for example, rename static-secret/ to secret/, or move it to a different parent directory).
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@hapi/inert' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@hapi/inert' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@hapi/inertを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
For users who cannot upgrade immediately: ensure the directory served via inert has no sibling whose name starts with the same characters (for example, rename `static-secret/` to `secret/`, or move it to a different parent directory).パッチが適用されるまでの応急処置として、For users who cannot upgrade immediately: ensure the directory served via inert has no sibling whose name starts with the same characters (for example, rename
static-secret/tosecret/, or move it to a different parent directory). を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade @hapi/inert to 7.1.1ステージング環境で 7.1.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- web github.com
- web github.com
- web github.com