{"answers":{"affected":"2 open source packages ship an affected version, including @koa/cors. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-49803 in the wild and no public exploit code.","fix":"Upgrade @koa/cors to 5.0.0 or later.","what":"CVE-2023-49803 is a high-severity vulnerability in koajs cors, published on 11 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-49803 and fix it if it is affected.\n\nWhat it is: CVE-2023-49803 is a high-severity vulnerability in koajs cors, published on 11 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-49803 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @koa/cors (npm): affected all versions; fixed in 5.0.0\n- @koa/cors (npm): affected all versions; fixed in 5.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-49803/ (Markdown: https://insights.sbomify.com/CVE-2023-49803/index.md)","id":"CVE-2023-49803","markdown":"https://insights.sbomify.com/CVE-2023-49803/index.md","name":"CVE-2023-49803","record":{"aliases":["CLSA-2026-1789052857","GHSA-qxrj-hx23-xp82"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Node.js CORS middleware","requires_auth":"none","summary":"The @koa/cors library disables Same Origin Policy by reflecting request origins when no allowed origin is configured, exposing users to cross-origin attacks.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"cross-origin_resource_sharing_for_koa","vendor":"koajs"}],"cvss":{"score":8.6,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-346","name":"Origin Validation Error"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"@koa/cors has overly permissive origin policy","id":"CVE-2023-49803","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2023"},"n_packages":2,"n_references":2,"next":{"headline":"Uptime Kuma Password Change Vulnerability","id":"CVE-2023-49804"},"packages":[{"ecosystem":"npm","fixed":["5.0.0"],"introduced":["0"],"last_affected":[],"package":"@koa/cors","purl":null,"source":"GHSA-qxrj-hx23-xp82"},{"ecosystem":"npm","fixed":["5.0.0"],"introduced":["0"],"last_affected":[],"package":"@koa/cors","purl":"pkg:npm/%40koa/cors","source":"GHSA-qxrj-hx23-xp82"}],"prev":{"headline":"MantisBT LinkedCustomFields Cross-site Scripting vulnerability","id":"CVE-2023-49802"},"products":["cors"],"published":"2023-12-11","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-02","vendors":["koajs"]},"summary":"The @koa/cors library disables Same Origin Policy by reflecting request origins when no allowed origin is configured, exposing users to cross-origin attacks.","url":"https://insights.sbomify.com/CVE-2023-49803/"}