CVE-2022-41715

Memory exhaustion when compiling regular expressions in regexp/syntax

HIGH
7.5
CVSS Score
Published: October 14, 2022 at 12:00 AM UTC
Updated: June 17, 2026 at 05:03 AM UTC
2 products affected across 2 vendorsGoGo

Using regexp/syntax by Go standard library?

Get instant alerts when new vulnerabilities affect regexp/syntax - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 2%

Description

Programs which compile regular expressions from untrusted sources may be vulnerable to memory exhaustion or denial of service. The parsed regexp representation is linear in the size of the input, but in some cases the constant factor can be as high as 40,000, making relatively small regexps consume much larger amounts of memory. After fix, each regexp being parsed is limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are rejected. Normal use of regular expressions is unaffected.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.18.71.19.0 ≤ v < 1.19.2
Affected range stops below 1.18.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.19.2, so it looks safe — our inference, not a vendor statement
v < 1.18.71.19.0-0 ≤ v < 1.19.21.19.0-0
Affected range stops below 1.18.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.19.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card