GHSA-9qxr-qj54-h672 CVE-2024-30261
Undici's fetch with integrity option is too lax when algorithm is specified but hash value is in incorrect
- Severity
- 2.6 / 10
- Low · CVSS 3.1
- Exploit chance (EPSS)
- 0.80%
- Chance of exploitation in the next 30 days. Higher than 56.71% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-284 Improper Access Control
- Fix
5.28.4- Upgrade undici to this version or later
Description
Impact
If an attacker can alter the integrity option passed to fetch(), they can let fetch() accept requests as valid even if they have been tampered.
Patches
Fixed in https://github.com/nodejs/undici/commit/d542b8cd39ec1ba303f038ea26098c3f355974f3. Fixes has been released in v5.28.4 and v6.11.1.
Workarounds
Ensure that integrity cannot be tampered with.
References
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| undici | < 5.28.4 |
5.28.4 |
| undici | >= 6.0.0, < 6.11.1 |
6.11.1 |
| undici | < 5.28.4 |
5.28.4 |
| undici | >= 6.0.0, < 6.11.1 |
6.11.1 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
undici npm → 5.28.4
- npm
npm install undici@5.28.4- yarn
yarn add undici@5.28.4- pnpm
pnpm add undici@5.28.4
Severity breakdown
CVSS 3.1 2.6
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Weakness
CWE-284: Improper Access Control
The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
How to prevent it
- Architecture and Design, Operation: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
References
Advisories
Fixes and patches
Packages
Other links
- hackerone.com/reports/2377760
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HQVHW…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P6Q4R…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NC3V3…
- security.netapp.com/advisory/ntap-20240905-0008
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HQVHW…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NC3V3…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P6Q4R…
- security.netapp.com/advisory/ntap-20240905-0008
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-55wc-3pg8-jfw6 undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor | High | Also affects undici |
| GHSA-qrxm-fqhp-jwvm undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation | High | Also affects undici |
| GHSA-9fm3-97px-rjf6 undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering | High | Also affects undici |
| GHSA-4qv8-2p9j-2685 undici vulnerable to Denial of Service via unbounded memory in the EventSource parser | High | Also affects undici |
| GHSA-xjj6-f33q-929c undici vulnerable to Denial of Service via unhandled error on excessive content-encodings | High | Also affects undici |
| GHSA-f72v-6w45-q472 undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens | High | Also affects undici |
| GHSA-4w7w-5xrc-9h26 undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects | Critical | Also affects undici |
| GHSA-2m5v-pch6-74hx undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent | Critical | Also affects undici |
Credits: Uzlopak
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor