Skip to content

Conversation

@harekrishnarai
Copy link

@harekrishnarai harekrishnarai commented Jun 20, 2025

This PR resolves the SEC-2158 security vulnerability by upgrading the deprecated core-js@3.20.3 dependency to version ^3.23.3 or later.

Background:
The vulnerability was identified by Socket.dev with the following details:

  • Artifact: core-js@3.20.3
  • Category: Maintenance
  • Priority Score: 350 (Medium Severity)
  • Issue: core-js@<3.23.3 is no longer maintained and not recommended for usage due to performance issues (up to 100x slowdown in V8 engine) and web compatibility issues

Implementation:
Since core-js@3.20.3 was a transitive dependency through @angular-devkit/build-angular@13.3.11, and upgrading Angular DevKit to a newer major version would require updating Angular itself (breaking change), I used npm overrides to force a newer core-js version while maintaining full compatibility with the existing Angular 13 setup.

Changes Made:

  • Added overrides field to package.json to force core-js version to ^3.23.3
  • Updated package-lock.json with the new dependency resolution
  • No breaking changes to the API or functionality

References

Testing

Verification Steps:

  1. npm install - Dependencies install successfully with override
  2. npm ls core-js - Shows core-js@3.43.0 overridden instead of deprecated 3.20.3
  3. npm run build:dev - Build completes successfully
  4. npm test - All 108 tests pass
  5. npm audit - The specific core-js vulnerability is no longer reported
image image

Environment:

  • Node.js: v20.19.0
  • npm: 10.8.2
  • Angular: 13.4.0

Manual Testing:
The library builds and tests successfully with the new core-js version. All existing functionality remains intact as this is purely a dependency security update with no code changes to the library itself.

  • This change adds test coverage for new/changed/fixed functionality (N/A - dependency update only)

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs (N/A - no functional changes)
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

- Add package.json override to force core-js version to ^3.23.3
- Resolves deprecated core-js@3.20.3 dependency vulnerability
- Maintains compatibility with Angular 13 and @angular-devkit/build-angular
- All tests pass and build works correctly

Fixes: SEC-2158
@harekrishnarai harekrishnarai marked this pull request as ready for review June 20, 2025 13:26
@harekrishnarai harekrishnarai requested a review from a team as a code owner June 20, 2025 13:26
@frederikprijck
Copy link
Member

frederikprijck commented Jun 20, 2025

As mentioned in slack, this SDK only support major versions that Angular supports, see https://github.com/auth0/auth0-angular?tab=readme-ov-file#requirements.

That means, today, we only have to worry about v18 and above, see: https://angular.dev/reference/releases#support-policy-and-schedule.

I think we should be able to solve it in that way as well if we want.

@frederikprijck
Copy link
Member

Closing in favor of #675

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.

2 participants