# CVE-2023-49803: @koa/cors has overly permissive origin policy

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.6
- **CVSS:** 8.6 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-346
- **Aliases:** GHSA-qxrj-hx23-xp82
- **Published:** 2023-12-11T21:46:21.000Z
- **Modified:** 2026-09-10T03:50:04.649Z

## Who should check

- Projects that depend on npm package @koa/cors (\< 5.0.0)
- Anyone running koajs cors \< 5.0.0

## 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

- npm `@koa/cors`: affected \< 5.0.0; fixed 5.0.0 (osv)
- koajs cors: \< 5.0.0 (cvelist)

## Mitigation

- Upgrade @koa/cors to 5.0.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/koajs/cors/security/advisories/GHSA-qxrj-hx23-xp82>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-49803>
- patch: <https://github.com/koajs/cors/commit/f31dac99f5355c41e7d4dd3c4a80c5f154941a11>
- other: <https://github.com/koajs/cors>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-49803>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-qxrj-hx23-xp82> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-49803> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-49803>
