{"api_version":"1","generated_at":"2026-04-23T01:14:56+00:00","cve":"CVE-2022-35949","urls":{"html":"https://cve.report/CVE-2022-35949","api":"https://cve.report/api/cve/CVE-2022-35949.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-35949","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-35949"},"summary":{"title":"CVE-2022-35949","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-08-12 23:15:00","updated_at":"2023-03-28 17:10:00"},"problem_types":["CWE-918"],"metrics":[],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3","name":"https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3","refsource":"CONFIRM","tags":[],"title":"`undici.request` vulnerable to SSRF using absolute URL on `pathname` · Advisory · nodejs/undici · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895","name":"https://github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-8qr4-xgw6-wmr3 · nodejs/undici@124f7eb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/nodejs/undici/releases/tag/v5.8.2","name":"https://github.com/nodejs/undici/releases/tag/v5.8.2","refsource":"MISC","tags":[],"title":"Release v5.8.2 · nodejs/undici · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-35949","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35949","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"35949","vulnerable":"1","versionEndIncluding":"5.8.1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"nodejs","cpe5":"undici","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-35949","qid":"182859","title":"Debian Security Update for node-undici (CVE-2022-35949)"},{"cve":"CVE-2022-35949","qid":"753302","title":"SUSE Enterprise Linux Security Update for nodejs16 (SUSE-SU-2022:3251-1)"},{"cve":"CVE-2022-35949","qid":"753318","title":"SUSE Enterprise Linux Security Update for nodejs16 (SUSE-SU-2022:3250-1)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-35949","STATE":"PUBLIC","TITLE":"`undici.request` vulnerable to SSRF using absolute URL on `pathname`"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"undici","version":{"version_data":[{"version_value":"<= 5.8.1"}]}}]},"vendor_name":"nodejs"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":6.4,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-918: Server-Side Request Forgery (SSRF)"}]}]},"references":{"reference_data":[{"name":"https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3","refsource":"CONFIRM","url":"https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3"},{"name":"https://github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895","refsource":"MISC","url":"https://github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895"},{"name":"https://github.com/nodejs/undici/releases/tag/v5.8.2","refsource":"MISC","url":"https://github.com/nodejs/undici/releases/tag/v5.8.2"}]},"source":{"advisory":"GHSA-8qr4-xgw6-wmr3","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-08-12 23:15:00","lastModifiedDate":"2023-03-28 17:10:00","problem_types":["CWE-918"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL"},"exploitabilityScore":3.9,"impactScore":5.9}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*","versionEndIncluding":"5.8.1","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}