CVE-2026-107891

musl: musl: Arbitrary code execution via integer overflow in regcomp

Published Nov 5, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
Description
musl libc before 1.2.7, when an untrusted regular expression is used with regcomp, has multiple integer overflows, possibly leading to incorrect allocation sizes and out-of-bounds heap writes.

Analysis

AI-generated

Technical impact

The vulnerability arises when an untrusted regular expression is compiled with musl libc’s regcomp before version 1.2.7. The function miscalculates the size of the internal structures, allowing integer overflows (CWE‑190) that result in out‑of‑bounds heap writes (CWE‑787). This corrupts memory and can potentially be used to alter program execution or execute arbitrary code, representing a serious security risk.

Affected Systems

Any system that uses musl libc before 1.2.7 is affected. This includes many lightweight or embedded Linux distributions that rely on musl, as well as any custom applications statically or dynamically linked against versions of musl older than 1.2.7. The exact version boundary is clear: all releases prior to 1.2.7.

Risk and Exploitability

The CVSS score of 8.1 indicates high severity. The EPSS score is not available, and the vulnerability is not listed in CISA's KEV. The likely attack vector involves an attacker supplying a crafted regular expression to an application that uses regcomp. While no proof of exploitation is published, the presence of a heap overflow can lead to remote code execution on vulnerable systems. Administrators should treat this as a high‑risk flaw.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade musl libc to version 1.2.7 or later, ensuring all components use the updated library.
  • If upgrading immediately is not feasible, audit and restrict any input that passes through regcomp, ensuring only trusted patterns are compiled or reject untrusted expressions.
  • For systems where an upgrade is not possible, enable address space layout randomization and memory protection tools such as stack canaries or coverage‑based sanitizers to detect or mitigate memory corruption.

Generated by OpenCVE AI on November 6, 2026 at 13:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Musl-libc
Musl-libc musl
Vendors & Products Musl-libc
Musl-libc musl
Type Values Removed Values Added
Title Integer Overflows in musl libc's regcomp Leading to Heap Overflows musl: musl: Arbitrary code execution via integer overflow in regcomp
Weaknesses CWE-787
References
Metrics threat_severity

None

threat_severity

Important

Type Values Removed Values Added
Title Integer Overflows in musl libc's regcomp Leading to Heap Overflows
Type Values Removed Values Added
Description musl libc before 1.2.7, when an untrusted regular expression is used with regcomp, has multiple integer overflows, possibly leading to incorrect allocation sizes and out-of-bounds heap writes.
Weaknesses CWE-190
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Nov 9, 2026, 10:09 PM
Reserved
Oct 9, 2026, 4:31 AM
Status
Awaiting Analysis
Published
Nov 5, 2026, 4:17 PM
Modified
Nov 12, 2026, 10:09 PM
Severity
Important
Public date
Nov 5, 2026, 3:16 PM