CVE-2022-41715

Memory exhaustion when compiling regular expressions in regexp/syntax

State
Published
Severity
Not scored
Published
Oct 14, 2022
Updated
Feb 13, 2025
Reserved
Sep 28, 2022

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
regexp/syntaxGo standard library
  • before 1.18.7Affected
  • 1.19.0-0 to before 1.19.2Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.