CVE-2023-49803 json
@koa/cors has overly permissive origin policy
published 2023-12-11 2 y ago modified 2026-09-10 1 mo ago also GHSA-qxrj-hx23-xp82 , EUVD-2023-3277
- cvss
- 8.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 20%
- public exploits
- 0
- none known
Summary
@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.
Patch / fix
- npm @koa/cors 5.0.0
- koajs cross-origin_resource_sharing_for_koa 5.0.0
Exploit prediction
0.28% chance of exploitation in the next 30 days, higher than 20% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 3.1 | 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @koa/cors | <5.0.0 |
5.0.0 |
Affected products
- koajs cors
Classification
- Weakness
-
- CWE-346 Origin Validation Error
References
-
github.com
/koajs/cors/commit/f31dac99f5355c41e7d4dd3c4a80c5f154941a11
web, patch
-
github.com
/koajs/cors/security/advisories/GHSA-qxrj-hx23-xp82
web, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-49803
advisory
-
github.com
/koajs/cors
package
Sources
- CVE List CVE-2023-49803
- GitHub Advisory GHSA-qxrj-hx23-xp82
- NVD CVE-2023-49803
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.