Bug 1202382 (CVE-2022-35949) - VUL-0: CVE-2022-35949: nodejs16: undici - SSRF when an application takes in user input into the path/pathname option of undici.request
Summary: VUL-0: CVE-2022-35949: nodejs16: undici - SSRF when an application takes in u...
Status: RESOLVED FIXED
Alias: CVE-2022-35949
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/339695/
Whiteboard: CVSSv3.1:SUSE:CVE-2022-35949:6.5:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-15 07:25 UTC by Robert Frohl
Modified: 2024-04-19 11:36 UTC (History)
1 user (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Frohl 2022-08-15 07:25:23 UTC
CVE-2022-35949

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.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-35949
https://github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-35949
https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3
https://github.com/nodejs/undici/releases/tag/v5.8.2
Comment 1 Robert Frohl 2022-08-15 07:26:31 UTC
tracking as affected:

- SUSE:SLE-12-SP5:Update/nodejs16
- SUSE:SLE-15-SP3:Update/nodejs16
- SUSE:SLE-15-SP4:Update/nodejs16
Comment 4 OBSbugzilla Bot 2022-08-25 16:40:06 UTC
This is an autogenerated message for OBS integration:
This bug (1202382) was mentioned in
https://build.opensuse.org/request/show/999257 Factory / nodejs16
Comment 5 Swamp Workflow Management 2022-09-08 13:59:35 UTC
SUSE-SU-2022:3196-1: An update that solves four vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 1200303,1200517,1201710,1202382,1202383
CVE References: CVE-2022-29244,CVE-2022-31150,CVE-2022-35948,CVE-2022-35949
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for Web Scripting 12 (src):    nodejs16-16.17.0-8.9.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 6 Swamp Workflow Management 2022-09-12 10:26:57 UTC
SUSE-SU-2022:3250-1: An update that solves four vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 1200303,1200517,1201710,1202382,1202383
CVE References: CVE-2022-29244,CVE-2022-31150,CVE-2022-35948,CVE-2022-35949
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    nodejs16-16.17.0-150400.3.6.1
SUSE Linux Enterprise Module for Web Scripting 15-SP4 (src):    nodejs16-16.17.0-150400.3.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Swamp Workflow Management 2022-09-12 10:33:34 UTC
SUSE-SU-2022:3251-1: An update that solves four vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 1200303,1200517,1201710,1202382,1202383
CVE References: CVE-2022-29244,CVE-2022-31150,CVE-2022-35948,CVE-2022-35949
JIRA References: 
Sources used:
openSUSE Leap 15.3 (src):    nodejs16-16.17.0-150300.7.9.1
SUSE Linux Enterprise Module for Web Scripting 15-SP3 (src):    nodejs16-16.17.0-150300.7.9.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 8 Robert Frohl 2024-04-19 11:36:34 UTC
done