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

Vulnerability reported in braces package that is using chokidar@3.5.3 #27654

Closed
1 task
Ashokkumar1995 opened this issue May 17, 2024 · 1 comment
Closed
1 task

Comments

@Ashokkumar1995
Copy link

Command

other

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

Hi, we are using Angular 15 in our project and recently got a vulnerability issue reported in one of the transitive dependencies used in "@angular-devkit/build-angular": "^15.2.11" package.

_Vulnerability message when we run audit:
[1/1] - pkg:npm/braces@3.0.2 - 1 vulnerability found!
Vulnerability Title: [CVE-2024-4068] CWE-1050
ID: CVE-2024-4068
Description: The NPM package braces fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js, if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.

CVSS Score: 7.5
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVE: CVE-2024-4068
Reference: https://ossindex.sonatype.org/vulnerability/CVE-2024-4068?component-type=npm&component-name=braces&utm_source=auditjs&utm_medium=integration&utm_content=4.0.45_

image.

I think this will affect other angular versions as well. can we get a minor fix for angular 15 and later versions?

Minimal Reproduction

Create a angular 15 project and use this library "auditjs": "^4.0.41", to run the audit.

Exception or Error

> auditjs ossi --q && (echo 'No Vulnerabilities Found.') || (echo 'Vulnerabilities found. Please fix them before proceeding further' && exit 1)
[1/1] - pkg:npm/braces@3.0.2 - 1 vulnerability found!
  Vulnerability Title:  [CVE-2024-4068] CWE-1050
  ID:  CVE-2024-4068
  Description:  The NPM package `braces` fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In `lib/parse.js,` if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.
  
  CVSS Score:  7.5
  CVSS Vector:  CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  CVE:  CVE-2024-4068
  Reference:  https://ossindex.sonatype.org/vulnerability/CVE-2024-4068?component-type=npm&component-name=braces&utm_source=auditjs&utm_medium=integration&utm_content=4.0.45

Your Environment

Angular CLI: 15.2.10
Node: 16.19.1
Package Manager: npm 8.19.3
OS: win32 x64

Angular: 15.2.10
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.10
@angular-devkit/build-angular   15.2.11
@angular-devkit/core            15.2.10
@angular-devkit/schematics      15.2.10
@angular/cdk                    15.2.9
@angular/flex-layout            15.0.0-beta.42
@angular/material               15.2.9
@schematics/angular             15.2.10
ng-packagr                      15.2.2
rxjs                            6.6.7
typescript                      4.8.2

Anything else relevant?

CVE-2024-4068 was recently introduced and thus the vulnerability was not reported before.

@alan-agius4
Copy link
Collaborator

Thanks for this issue, unfortunately this is not actionable from our end. It’s worth mentioning that this vulnerability cannot be exploited when using the Angular CLI, as users cannot provide RegExp to the file watcher.

Please see: paulmillr/chokidar#1314

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
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

No branches or pull requests

2 participants