Skip to content

@angular/build@21 depends on [email protected] which is vulnerable to multiple CVEs #34518

Open

Description

@cracksalad

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

@angular/build v21 depends on undici v7.29.1 which is vulnerable to CVE-2026-109924, CVE-2026-109841 and CVE-2026-109869. Fixed version is v7.30.1.
As far as I can tell, @angular/build v20 and v22 do not depend on undici at all and are therefore not affected.

Minimal Reproduction

  1. npm install @angular/build@21
  2. npm audit

Exception or Error


Your Environment

Angular CLI       : 21.2.27
Angular           : 21.2.25
Node.js           : 24.22.1
Package Manager   : npm 11.19.0
Operating System  : linux x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 21.2.27           │ ^21.2.27          │
│ @angular/cdk              │ 21.2.14           │ ^21.2.14          │
│ @angular/cli              │ 21.2.27           │ ^21.2.21          │
│ @angular/common           │ 21.2.25           │ ^21.2.20          │
│ @angular/compiler         │ 21.2.25           │ ^21.2.25          │
│ @angular/compiler-cli     │ 21.2.25           │ ^21.2.25          │
│ @angular/core             │ 21.2.25           │ ^21.2.25          │
│ @angular/elements         │ 21.2.25           │ ^21.2.20          │
│ @angular/forms            │ 21.2.25           │ ^21.2.20          │
│ @angular/platform-browser │ 21.2.25           │ ^21.2.20          │
│ @angular/router           │ 21.2.25           │ ^21.2.25          │
│ @angular/service-worker   │ 21.2.25           │ ^21.2.20          │
│ ng-packagr                │ 21.2.7            │ ^21.2             │
│ rxjs                      │ 7.8.2             │ ^7.8.2            │
│ typescript                │ 5.9.3             │ ^5.9.3 || ^6      │
│ vitest                    │ 4.1.12            │ ^4.1.7            │
│ zone.js                   │ 0.16.3            │ ^0.15 || ^0.16    │
└───────────────────────────┴───────────────────┴───────────────────┘

Anything else relevant?

Since I open issues to update vulnerable dependencies fairly often now, I want to ask a few questions:

  1. What is the reason for pinning versions in package.json? In this case doing a ~7.29.1 would not help, I know, but in many other cases it would.
  2. Should there be some kind of security scanner, a scheduled GitHub action running npm audit or something similar? This would probably detect vulnerable dependencies way faster than I do.
  3. The time to fix those vulnerable dependencies measured from release of the fix for the dependency until release of @angular/xxx is sometimes very long (> 1 week), which in my opinion is too much nowadays. This is my general concern and the first two questions already try to find solutions to this. Any other ideas?

Activity

  1. florimond-collette commented on Oct 25, 2026

    @florimond-collette

    Adding the advisory IDs and a per-branch check. All three advisories are fixed in undici 7.30.1:

    Affected lines, confirming the assessment above:

    • 21.2.x (21.2.28, latest v21-lts): @angular/build has "undici": "7.29.1" in its dependencies, so every v21 install gets the vulnerable version.
    • 20.3.x (20.3.41): no published package depends on undici. A fresh install only gets undici 6.29.1 via node-gyp (^6.25.0), which is already patched, and npm audit reports 0 vulnerabilities. The repo still pins 7.29.1 as a devDependency (root and @angular-devkit/build-angular).
    • 22.2.x (22.2.4): no published package depends on undici. The repo devDependency is 8.10.2 (the 8.x fix is 8.12.2). The Dependency Dashboard (Dependency Dashboard #23493) already has "update dependency undici to v8.12.3 (22.2.x)" waiting for approval.

    npm install @angular/build@21 followed by npm audit:

    # npm audit report
    
    undici  7.0.0 - 7.30.0
    Severity: high
    undici vulnerable to Denial of Service via unbounded memory in the EventSource parser - https://github.com/advisories/GHSA-4qv8-2p9j-2685
    undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens - https://github.com/advisories/GHSA-f72v-6w45-q472
    undici vulnerable to Denial of Service via unhandled error on excessive content-encodings - https://github.com/advisories/GHSA-xjj6-f33q-929c
    fix available via `npm audit fix --force`
    Will install @angular/[email protected], which is a breaking change
    node_modules/undici
      @angular/build  21.0.0-next.0 - 21.2.28
      Depends on vulnerable versions of undici
      node_modules/@angular/build
    
    2 vulnerabilities (1 moderate, 1 high)
    
    To address all issues (including breaking changes), run:
      npm audit fix --force
    

    Fix PRs, in the same shape as the previous undici backports (#34053, #34052):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions