Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@angular-devkit/build-angular depends on vulnerable version of vite #27409

Closed
1 task
danielalexis opened this issue Apr 3, 2024 · 8 comments
Closed
1 task
Assignees
Labels

Comments

@danielalexis
Copy link

danielalexis commented Apr 3, 2024

Command

build

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

Got a notification that the latest version of @angular-devkit/build-angular (v17.3.3) includes Vite 5.1.5 which has a vulnerability.
imagem

Github Advisory: GHSA-8jhw-289h-jh2g

Minimal Reproduction

Use the latest @angular-devkit/build-angular (v17.3.3), it will install vite 5.1.5

Exception or Error

No response

Your Environment

Angular CLI: 17.3.3
Node: 20.12.1
Package Manager: npm 10.5.1
OS: win32 x64

Angular: 17.3.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, material-experimental, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.3
@angular-devkit/build-angular   17.3.3
@angular-devkit/core            17.3.3
@angular-devkit/schematics      17.3.3
@angular/cli                    17.3.3
@schematics/angular             17.3.3
rxjs                            7.8.1
typescript                      5.4.3
zone.js                         0.14.4

Anything else relevant?

Package Manager: NPM

@CuriousWizard
Copy link

This vulnerability notice also occurs when you create a new project with Angular CLI version 16.2.13 and run npm audit on it.

@miguellira
Copy link

Current workaround is to specify the following overrides in package.json:

  "overrides": {
    "undici": "^6.11.1",
    "vite": "~5.1.7"
  }

It is important to note that angular-memory-plugin generates a runtime error with the latest version of vite 5.2.8 which is why it is ~5.1.7 and not ^5.1.7

Excerpt of error

...
node_modules\@angular-devkit\build-angular\src\tools\vite\angular-memory-plugin.js:240:31
...
[vite] Internal server error: Failed to update Vite client error overlay text. (2)
      at loadViteClientCode

@lsmith77
Copy link

lsmith77 commented Apr 7, 2024

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Apr 8, 2024
@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity6: security labels Apr 8, 2024
@alan-agius4 alan-agius4 self-assigned this Apr 8, 2024
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Apr 8, 2024
alan-agius4 added a commit that referenced this issue Apr 8, 2024
@alan-agius4
Copy link
Collaborator

Closed via #27430 and #27429

@Fabrice-K
Copy link

@alan-agius4, please, can you tell me when the fix will be available on NPM Registry please.

@alan-agius4
Copy link
Collaborator

@Fabrice-K, typically, releases are done on Wednesdays

@Fabrice-K
Copy link

Fabrice-K commented Apr 9, 2024 via email

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants