Skip to content

Update dependency @angular/core to v21.2.20 [SECURITY] - #429

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-angular-core-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-angular-core-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Sep 11, 2026

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@angular/core (source) 21.2.1921.2.20 age adoption passing confidence

Angular: Sanitization bypass via directive host bindings on concrete host elements in @​angular/core and @​angular/compiler

CVE-2026-88057 / GHSA-hh8m-fm6v-7cvg

More information

Details

Angular automatically sanitizes untrusted values bound to security-sensitive DOM sinks (such as href, src, action, xlink:href, and data) to protect against Cross-Site Scripting (XSS).

Prior to the fix, the Angular compiler determined the SecurityContext for directive host bindings (host: {'[attr.href]': 'value'} or @HostBinding('attr.href')) based solely on the declaring directive or component selector at compile time, rather than the concrete host element that the directive was applied to.

When a directive with a security-sensitive host binding was applied to a different concrete host element—such as through:

  • hostDirectives composition,
  • Class inheritance of host bindings,
  • Dynamic component instantiation (createComponent with custom hostElement or dynamic directives),
  • Elements with SVG/MathML namespaces (e.g. <svg:a>, <math>), or
  • Elements using tag-neutral selectors (e.g. :not(...)),

the compiler either failed to associate a sanitizer with the host binding or attached an incorrect security context. As a result, untrusted inputs (e.g. javascript:... URLs) bound via the host binding would be written to the DOM attribute without passing through Angular's built-in sanitizer.

Impact

An attacker capable of controlling the value bound to an affected directive host binding could execute arbitrary JavaScript in the user's browser context (Cross-Site Scripting).

Patches

This issue has been resolved in versions:

  • 22.1.0
  • 21.2.20
  • 20.3.28
Workarounds

Ensure that any user-controlled values assigned to properties bound via directive host bindings are explicitly sanitized using DomSanitizer.sanitize(SecurityContext.URL, ...) before assignment, or restrict the input to validated safe URL schemes (e.g. http://, https://).

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

angular/angular (@​angular/core)

v21.2.20

Compare Source

core
Commit Type Description
6afe6fa781 fix sanitize host bindings on concrete hosts
http
Commit Type Description
fec5977df4 fix match header values exactly when deleting
e33d69a71c fix preserve immutability of materialized clones
caf616670f fix run root interceptors in the terminal request chain

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions

Copy link
Copy Markdown

🎨 Chromatic Visual Tests

✅ No visual changes

Review

View in Chromatic

Chromatic provides automated visual testing and review for component changes.

@github-actions

Copy link
Copy Markdown

Test Results

Coverage Summary

Node Lines Statements Branches Functions
22 75.94% 74.96% 61.59% 77.97%
24 75.94% 74.96% 61.59% 77.97%
25 75.94% 74.96% 61.59% 77.97%

Coverage & Quality Reports

📊 Codecov Report
🎨 Chromatic Status


For more details, check the workflow run

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.99%. Comparing base (2a772d8) to head (a7ec503).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #429   +/-   ##
=======================================
  Coverage   76.99%   76.99%           
=======================================
  Files          51       51           
  Lines        3569     3569           
  Branches     1018     1018           
=======================================
  Hits         2748     2748           
  Misses        819      819           
  Partials        2        2           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants