chore: upgrade Angular 19 → 20 to resolve security vulnerabilities#953
Merged
Conversation
Bumps all Angular packages from v19 to v20.3.26 and aligns build tooling accordingly. Fixes three CVEs in @angular/common, @angular/compiler, and @angular/core (ReDoS, weak hash, XSS, immutable data modification) reported by Snyk at High/Critical severity. Changed packages: - @angular/* (animations, common, compiler, core, platform-browser, platform-browser-dynamic, router, forms, compiler-cli): 19.2.x → 20.3.26 - @angular-devkit/build-angular: 19.2.24 → 20.3.32 - @angular/cli: 19.2.24 → 20.3.32 - @angular-eslint/*: 19.0.0 → 20.7.0 - ng-packagr: 19.2.2 → 20.3.2 No changes to jest, jest-preset-angular, @types/jest, or typescript — build-angular 20.x still supports jest ^29.x and jest-preset-angular 14.x supports @angular/compiler-cli <21.0.0.
📝 WalkthroughWalkthroughAngular runtime, development tooling, ESLint packages, and ChangesAngular 20 upgrade
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
yogeshchoudhary147
force-pushed
the
chore/angular-20-migration
branch
from
July 17, 2026 08:50
2c36fd1 to
2e43e4f
Compare
Constructor injection is still fully supported in Angular 20. Disabling this opinionated rule keeps the diff focused on the security fix. Migration to inject() can be done in a follow-up PR.
This was referenced Jul 17, 2026
Piyush-85
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@angular/*packages from v19.2.x to v20.3.26@angular-devkit/build-angular,@angular/cli,ng-packagr,@angular-eslint/*) to their v20 counterparts@angular-eslint/prefer-injectrule introduced in@angular-eslint@20(constructor injection is still fully supported in Angular 20; migration toinject()can be done in a follow-up PR)Why v20 and not a v19 patch
No fix was backported to v19 —
19.2.25is the latest Angular 19 release and remains vulnerable per Snyk. The fix only exists in v20.3.25+. Staying on v19 is also not viable as its LTS window ended May 2026, meaning Google is no longer issuing security patches for it.Security fixes
@angular/common@19.x@angular/common@19.x@angular/compiler@19.x@angular/core@19.xPackage changes
@angular/*(7 deps)^19.2.21^20.3.26@angular/compiler-cli^19.2.21^20.3.26@angular/forms^19.2.21^20.3.26@angular-devkit/build-angular^19.2.24^20.3.32@angular/cli^19.2.24^20.3.32@angular-eslint/*(5 packages)^19.0.0^20.7.0ng-packagr^19.2.2^20.3.2No changes to
jest,jest-preset-angular,@types/jest, ortypescript—build-angular20.x still supportsjest@^29.xandjest-preset-angular@14.xsupports@angular/compiler-cli <21.0.0.Consumer impact
No changes to the library's public API or
peerDependencies(>=13). The library source code is unchanged. However, the compiled output now uses Angular 20's toolchain; consumers on older Angular versions should test their integration as Angular does not guarantee cross-version compiler compatibility.Test plan
npm run build:devpassesnpm test— all 184 tests passnpm run lintpasses