{"answers":{"affected":"4 open source packages ship an affected version, including koa. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62595 exists.","fix":"Upgrade koa to a fixed version for your release line: 2.16.3 or 3.0.3.","what":"CVE-2025-62595 is a medium-severity vulnerability in koajs koa, published on 21 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-62595 and fix it if it is affected.\n\nWhat it is: CVE-2025-62595 is a medium-severity vulnerability in koajs koa, published on 21 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62595 exists.\n\nAffected packages and fixed versions:\n- koa (npm): affected from 2.16.2; fixed in 2.16.3\n- koa (npm): affected from 2.16.2; fixed in 2.16.3\n- koa (npm): affected from 3.0.1; fixed in 3.0.3\n- koa (npm): affected from 3.0.1; fixed in 3.0.3\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-2025-62595/ (Markdown: https://insights.sbomify.com/CVE-2025-62595/index.md)","id":"CVE-2025-62595","markdown":"https://insights.sbomify.com/CVE-2025-62595/index.md","name":"CVE-2025-62595","record":{"aliases":["GHSA-g8mr-fgfg-5qpc"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js web framework","requires_auth":"none","summary":"Attackers can exploit a flaw in Koa's back redirect logic to force users to malicious external sites via manipulated Referer headers.","user_interaction":"required","vuln_class":"open_redirect"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"koa","vendor":"koajs"}],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site"}],"description":"Koa is expressive middleware for Node.js using ES2017 async functions. In versions 2.16.2 to before 2.16.3 and 3.0.1 to before 3.0.3, a bypass to CVE-2025-8129 was discovered in the Koa.js framework affecting its back redirect functionality. In certain circumstances, an attacker can manipulate the Referer header to force a user’s browser to navigate to an external, potentially malicious website. This occurs because the implementation incorrectly treats some specially crafted URLs as safe relative paths. Exploiting this vulnerability could allow attackers to perform phishing, social engineering, or other redirect-based attacks on users of affected applications. This issue has been patched in version 3.0.3.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Koa Vulnerable to Open Redirect via Trailing Double-Slash (//) in back Redirect Logic","id":"CVE-2025-62595","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"open_redirect","year":"2025"},"n_packages":4,"n_references":2,"next":{"headline":"youki container escape and denial of service due to arbitrary write gadgets and procfs write redirects","id":"CVE-2025-62596"},"packages":[{"ecosystem":"npm","fixed":["2.16.3"],"introduced":["2.16.2"],"last_affected":[],"package":"koa","purl":null,"source":"GHSA-g8mr-fgfg-5qpc"},{"ecosystem":"npm","fixed":["2.16.3"],"introduced":["2.16.2"],"last_affected":[],"package":"koa","purl":"pkg:npm/koa","source":"GHSA-g8mr-fgfg-5qpc"},{"ecosystem":"npm","fixed":["3.0.3"],"introduced":["3.0.1"],"last_affected":[],"package":"koa","purl":null,"source":"GHSA-g8mr-fgfg-5qpc"},{"ecosystem":"npm","fixed":["3.0.3"],"introduced":["3.0.1"],"last_affected":[],"package":"koa","purl":"pkg:npm/koa","source":"GHSA-g8mr-fgfg-5qpc"}],"prev":{"headline":"ImageMagick CLAHE : Unsigned underflow and division-by-zero lead to OOB pointer arithmetic and process crash (DoS)","id":"CVE-2025-62594"},"products":["koa"],"published":"2025-10-21","related":[{"cvss_score":9.2,"headline":"Koa has Inefficient Regular Expression Complexity","id":"CVE-2025-25200","kev_date_added":null,"published":"2025-02-12"},{"cvss_score":7.5,"headline":"Koa has Host Header Injection via `ctx.hostname`","id":"CVE-2026-27959","kev_date_added":null,"published":"2026-02-26"},{"cvss_score":5.1,"headline":"KoaJS Koa HTTP Header response.js back redirect","id":"CVE-2025-8129","kev_date_added":null,"published":"2025-07-25"},{"cvss_score":5,"headline":"XSS at ctx.redirect() function in Koajs","id":"CVE-2025-32379","kev_date_added":null,"published":"2025-04-09"}],"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":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["koajs"]},"summary":"Attackers can exploit a flaw in Koa's back redirect logic to force users to malicious external sites via manipulated Referer headers.","url":"https://insights.sbomify.com/CVE-2025-62595/"}