CVE-2026-77299

Description

A flaw was found in regexp2. A remote attacker can exploit this vulnerability by submitting a specially crafted regular expression pattern containing a large repetition quantifier applied to an empty subexpression. When evaluated, the matching engine continuously allocates memory on its internal backtracking stack without bounds, rapidly consuming system resources and causing the application to crash. This failure leads to a Denial of Service (DoS).

Statement

This vulnerability is rated as an Important severity because it enables remote attackers to crash consuming Go applications or services through rapid memory exhaustion without authentication. Applications utilizing regexp2 are susceptible when they compile or evaluate untrusted, user-controlled regular expressions. In typical Red Hat environments, Go services parsing arbitrary expressions directly from network clients face service termination via out-of-memory errors, whereas deployments that restrict pattern definitions to trusted administrative inputs remain unaffected.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

--- CME Mitigation Guidance (2026-11-06) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to enforce computational budget and backtracking depth limits within regexp2 or disallow untrusted user-supplied patterns: upgrade to regexp2 2.3.0 (or the corresponding fixed Red Hat builds), which enforce a default limit of 100,000 slots on the backtracking stack via OptionMaxBacktrackingStackSize and optimize away repeated literal empty expressions, closing crafted regular expression with large repetition quantifier on empty subexpression. Until patched, this is only a concern on Go applications compiling or matching untrusted, user-supplied regular expressions using regexp2 — deployments restricting pattern definitions to trusted administrative inputs are unaffected — so validate incoming patterns to reject large quantifier values and zero-width repetitions, and restrict regular expression compilation exclusively to trusted administrative inputs. As a compensating measure, enforce per-process address space limits (RLIMIT_AS) via ulimit or prlimit to constrain memory consumed by the backtracking stack, reject regular expression inputs containing repetition quantifiers that exceed safe application-defined bounds before passing them to regexp2, and apply cgroups v2 resource limits to bound container memory usage and prevent host-wide memory starvation. These controls limit blast radius and contain exploitation, but they do not fix the underlying unbounded memory allocation defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-1316 Algorithmic Complexity Safeguards (Pattern/Regex Execution Limits) (high)

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.5N/A7.5
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityNoneN/ANone
Integrity ImpactNoneN/ANone
Availability ImpactHighN/AHigh

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)

When allocating resources without limits, an attacker could prevent other systems, applications, or processes from accessing the same type of resource. It can be easy for an attacker to consume many resources by rapidly making many requests or causing larger resources to be used than is needed.

Frequently Asked Questions

Want to get errata notifications? Sign up here.