Skip to content

aws-cdk-lib: depends on vulnerable minimatch (<10.2.3) #37100

@jaidyn-adapptor

Description

@jaidyn-adapptor

Describe the bug

aws-cdk-lib currently depends on a vulnerable version of minimatch (<10.2.3), which is affected by 2 high severity ReDoS vulnerabilities:

GHSA-7r86-cg39-jmmj
minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments

GHSA-23c5-xmqv-rm74
minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions

These vulnerabilities are flagged by npm audit in projects using aws-cdk-lib.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

aws-cdk-lib should upgrade to a non-vulnerable version of minimatch (>= 10.2.1), or update the dependency chain so that vulnerable versions are no longer pulled in.

Current Behavior

minimatch  10.0.0 - 10.2.2
Severity: high
minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments - https://github.com/advisories/GHSA-7r86-cg39-jmmj
minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions - https://github.com/advisories/GHSA-23c5-xmqv-rm74
fix available via `npm audit fix`
node_modules/aws-cdk-lib/node_modules/minimatch
  aws-cdk-lib  >=2.240.0
  Depends on vulnerable versions of minimatch
  node_modules/aws-cdk-lib

Reproduction Steps

Run npm audit

Possible Solution

Update minimatch version to 10.2.3.

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.240.0

AWS CDK CLI version

2.1107.0 (build e51b1ae)

Node.js Version

25.3.0

OS

macOS 26.3

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws-cdk-libRelated to the aws-cdk-lib packagebugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions