PortGate

Advisories · Node.js & Next.js

CVE-2024-4068 High CVSS 7.5

braces regular-expression denial of service

Disclosed 2024 · Last reviewed 2 Dec 2026

A crafted brace pattern could make the library consume CPU.

What happened

The expander backtracked on an unterminated pattern.

Affected and patched versions

Affected
braces before 3.0.3.
Patched
braces 3.0.3 and later.

How to check your server

Check

npm ls braces

How to fix and harden

  1. Upgrade braces to 3.0.3 or later.
  2. It is usually pulled in by glob. Update the lockfile.

Fix

npm ls braces

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON