Vulnerability · Published Nov 1, 2024 · Assigned by GitHub_M
CVE-2024-49770oak's path traversal allows transfer of hidden files within the served root directory
High 7.7
In plain English
A high-severity path traversal in oak from oakserver. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 54% of all known vulnerabilities).
Official description
`oak` is a middleware framework for Deno's native HTTP server, Deno Deploy, Node.js 16.5 and later, Cloudflare Workers and Bun. By default `oak` does not allow transferring of hidden files with `Context.send` API. However, prior to version 17.1.3, this can be bypassed by encoding `/` as its URL encoded form `%2F`. For an attacker this has potential to read sensitive user data or to gain access to server secrets. Version 17.1.3 fixes the issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @oakserver/oak | no fix listed | GHSA-qm92-93fv-vh7m |
Affected products (as reported)
Weakness: CWE-35, CWE-22 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
References
- https://github.com/oakserver/oak/security/advisories/GHSA-qm92-93fv-vh7m x_refsource_CONFIRM
- https://github.com/oakserver/oak/commit/4b2f27efd5cba5a45b2c3982e610da3af0869209 x_refsource_MISC
- https://github.com/oakserver/oak/blob/3896fe568b25ac0b4c5afbf822ff8344c3d1712a/send.ts#L117-L125 x_refsource_MISC
- https://github.com/oakserver/oak/blob/3896fe568b25ac0b4c5afbf822ff8344c3d1712a/send.ts#L182C10-L182C25 x_refsource_MISC