Skip to content

[Snyk] Security upgrade @angular/compiler from 8.2.13 to 19.2.17#78

Open
thiennn wants to merge 1 commit intomasterfrom
snyk-fix-71a251ba0cd3409b20f28d2feda500d8
Open

[Snyk] Security upgrade @angular/compiler from 8.2.13 to 19.2.17#78
thiennn wants to merge 1 commit intomasterfrom
snyk-fix-71a251ba0cd3409b20f28d2feda500d8

Conversation

@thiennn
Copy link
Copy Markdown
Owner

@thiennn thiennn commented Dec 5, 2025

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • myshop-angular/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Cross-site Scripting (XSS)
SNYK-JS-ANGULARCOMPILER-14157154
  706  

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Cross-site Scripting (XSS)

Copilot AI review requested due to automatic review settings December 5, 2025 10:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to fix a high-severity XSS vulnerability (SNYK-JS-ANGULARCOMPILER-14157154) by upgrading @angular/compiler from version 8.2.13 to 19.2.17. However, this upgrade will break the application because it only upgrades a single Angular package while leaving all other Angular dependencies at version 8.2.13, creating critical version incompatibilities.

Key Issues:

  • Only @angular/compiler is upgraded to v19.2.17; all other Angular packages remain at v8.2.13
  • Angular requires all framework packages to be at the same major version
  • TypeScript 3.5.3 is incompatible with Angular 19 (requires TypeScript 5.6+)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@angular/animations": "~8.2.13",
"@angular/common": "~8.2.13",
"@angular/compiler": "~8.2.13",
"@angular/compiler": "~19.2.17",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This upgrade introduces a critical version mismatch. The @angular/compiler is being upgraded from v8.2.13 to v19.2.17 (a jump of 11 major versions), but all other Angular packages remain at v8.2.13:

  • @angular/animations: ~8.2.13
  • @angular/common: ~8.2.13
  • @angular/core: ~8.2.13
  • @angular/forms: ~8.2.13
  • @angular/platform-browser: ~8.2.13
  • @angular/platform-browser-dynamic: ~8.2.13
  • @angular/router: ~8.2.13
  • @angular/compiler-cli: ~8.2.13 (in devDependencies)

Angular packages must be kept in sync at the same major version. This mismatch will cause compilation errors and runtime failures because the compiler version is incompatible with the other Angular packages.

Recommendation: Upgrade all Angular packages together to v19.2.17, or find a security patch for Angular v8 if a full migration is not feasible. A major version upgrade from v8 to v19 requires careful migration following Angular's update guides for each major version.

Suggested change
"@angular/compiler": "~19.2.17",
"@angular/compiler": "~8.2.13",

Copilot uses AI. Check for mistakes.
"@angular/animations": "~8.2.13",
"@angular/common": "~8.2.13",
"@angular/compiler": "~8.2.13",
"@angular/compiler": "~19.2.17",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Angular 19 requires TypeScript 5.6 or later, but this project is using TypeScript ~3.5.3. This version incompatibility will cause build failures even if the Angular version mismatch is resolved.

If upgrading all Angular packages to v19, the TypeScript dependency must also be updated to at least v5.6 to match Angular 19's requirements.

Copilot uses AI. Check for mistakes.
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.

3 participants