CVE-2023-49803
@koa/cors has overly permissive origin policy
Also known as GHSA-qxrj-hx23-xp82
Mitigation
- Upgrade @koa/cors to 5.0.0 or later.
Who should check
- Projects that depend on npm package @koa/cors (< 5.0.0)
- Anyone running koajs cors < 5.0.0
Vulnerability facts
- Affected
- @koa/cors < 5.0.0
- Fixed in
- 5.0.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.6 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.33% chance of exploitation in 30 days (percentile 19, 2026-11-26)
- CWE
- CWE-346
- Modified
Description
@koa/cors npm provides Cross-Origin Resource Sharing (CORS) for koa, a web framework for Node.js. Prior to version 5.0.0, the middleware operates in a way that if an allowed origin is not provided, it will return an `Access-Control-Allow-Origin` header with the value of the origin from the request. This behavior completely disables one of the most crucial elements of browsers - the Same Origin Policy (SOP), this could cause a very serious security threat to the users of this middleware. If such behavior is expected, for instance, when middleware is used exclusively for prototypes and not for production applications, it should be heavily emphasized in the documentation along with an indication of the risks associated with such behavior, as many users may not be aware of it. Version 5.0.0 fixes this vulnerability.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-49803. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-49803.md Affected: @koa/cors < 5.0.0 Fixed in: 5.0.0 Steps: 1. Search this machine and project for @koa/cors (npm), koajs cors: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2023-49803 being exploited?
There is no confirmed exploitation: CVE-2023-49803 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-49803?
High: CVSS 8.6 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2023-49803?
@koa/cors < 5.0.0.
Is there a fix for CVE-2023-49803?
Yes. Fixed in 5.0.0. Upgrade @koa/cors to 5.0.0 or later.
How do I check if I'm affected by CVE-2023-49803?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.