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

Published Dec 11, 2023
·
Updated

@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 Software

2 affected componentsFixes available
npm/@koa/cors<5.0.0
5.0.0
KoaJS Cross-origin Resource Sharing For Koa Node.js<5.0.0

Event History

Dec 11, 2023
Advisory Published
09:46 PM
CVE Published
via MITRE·10:42 PM
Data Sourced
via MITRE·10:42 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-49803?

CVE-2023-49803 has been classified as a medium severity vulnerability due to its potential impact on security for web applications using the affected middleware.

2

How do I fix CVE-2023-49803?

To fix CVE-2023-49803, update the @koa/cors package to version 5.0.0 or later.

3

What are the potential impacts of CVE-2023-49803?

CVE-2023-49803 can result in improperly managed cross-origin resource sharing, leading to potential data exposure or attacks from malicious origins.

4

Which versions of @koa/cors are affected by CVE-2023-49803?

Versions of @koa/cors prior to 5.0.0 are affected by CVE-2023-49803.

5

Where can I find more information about CVE-2023-49803?

More information can be obtained from the GitHub repository for @koa/cors, which provides details on the vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203