{"answers":{"affected":"2 open source packages ship an affected version, including undici. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-35949 exists.","fix":"Upgrade undici to 5.8.2 or later.","what":"CVE-2022-35949 is a medium-severity server-side request forgery vulnerability in Nodejs Undici, published on 12 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-35949 and fix it if it is affected.\n\nWhat it is: CVE-2022-35949 is a medium-severity server-side request forgery vulnerability in Nodejs Undici, published on 12 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-35949 exists.\n\nAffected packages and fixed versions:\n- undici (npm): affected all versions; fixed in 5.8.2\n- undici (npm): affected all versions; fixed in 5.8.2\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-2022-35949/ (Markdown: https://insights.sbomify.com/CVE-2022-35949/index.md)","id":"CVE-2022-35949","markdown":"https://insights.sbomify.com/CVE-2022-35949/index.md","name":"CVE-2022-35949","record":{"aliases":["DEBIAN-CVE-2022-35949","GHSA-8qr4-xgw6-wmr3"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js HTTP client","requires_auth":"none","summary":"Attackers can exploit SSRF in undici library by manipulating pathname input to redirect requests to internal services, affecting Node.js applications using this HTTP client.","user_interaction":"not_required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"undici","vendor":"nodejs"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"description":"undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Forgery) when an application takes in **user input** into the `path/pathname` option of `undici.request`. If a user specifies a URL such as `http://127.0.0.1` or `//127.0.0.1` ```js const undici = require(\"undici\") undici.request({origin: \"http://example.com\", pathname: \"//127.0.0.1\"}) ``` Instead of processing the request as `http://example.org//127.0.0.1` (or `http://example.org/http://127.0.0.1` when `http://127.0.0.1 is used`), it actually processes the request as `http://127.0.0.1/` and sends it to `http://127.0.0.1`. If a developer passes in user input into `path` parameter of `undici.request`, it can result in an _SSRF_ as they will assume that the hostname cannot change, when in actual fact it can change because the specified path parameter is combined with the base URL. This issue was fixed in `undici@5.8.1`. The best workaround is to validate user input before passing it to the `undici.request` call.","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":"`undici.request` vulnerable to SSRF using absolute URL on `pathname`","id":"CVE-2022-35949","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":"nodejs:undici","products":["nodejs:undici"],"type":"ssrf","year":"2022"},"n_packages":2,"n_references":3,"next":{"headline":"OroCommerce Cross-site Scripting vulnerability in add note dialog of Shopping List line item","id":"CVE-2022-35950"},"packages":[{"ecosystem":"npm","fixed":["5.8.2"],"introduced":["0"],"last_affected":[],"package":"undici","purl":null,"source":"GHSA-8qr4-xgw6-wmr3"},{"ecosystem":"npm","fixed":["5.8.2"],"introduced":["0"],"last_affected":[],"package":"undici","purl":"pkg:npm/undici","source":"GHSA-8qr4-xgw6-wmr3"}],"prev":{"headline":"CRLF Injection in Nodejs ‘undici’ via Content-Type","id":"CVE-2022-35948"},"products":["undici"],"published":"2022-08-12","related":[{"cvss_score":7.5,"headline":"undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake","id":"CVE-2026-109855","kev_date_added":null,"published":"2026-10-15"},{"cvss_score":7.5,"headline":"undici vulnerable to Denial of Service via unhandled error on excessive content-encodings","id":"CVE-2026-109869","kev_date_added":null,"published":"2026-10-15"},{"cvss_score":7.5,"headline":"undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation","id":"CVE-2026-87018","kev_date_added":null,"published":"2026-10-15"},{"cvss_score":7.5,"headline":"undici vulnerable to Denial of Service via unrequested WebSocket subprotocol","id":"CVE-2026-19534","kev_date_added":null,"published":"2026-09-04"},{"cvss_score":7.5,"headline":"undici WebSocket client vulnerable to denial of service via fragment count bypass","id":"CVE-2026-12151","kev_date_added":null,"published":"2026-06-17"},{"cvss_score":7.5,"headline":"undici vulnerable to cross-origin request routing via SOCKS5 proxy pool reuse","id":"CVE-2026-6734","kev_date_added":null,"published":"2026-06-17"},{"cvss_score":7.5,"headline":"undici WebSocket client vulnerable to denial of service via cumulative fragment bypass","id":"CVE-2026-9675","kev_date_added":null,"published":"2026-06-17"}],"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":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["nodejs"]},"summary":"Attackers can exploit SSRF in undici library by manipulating pathname input to redirect requests to internal services, affecting Node.js applications using this HTTP client.","url":"https://insights.sbomify.com/CVE-2022-35949/"}