Back

MEDIUM

Dash: dash: super-polynomial backtracking in pmatch when libc fnmatch is disabled

Published Sep 29, 2026

Description

A flaw was found in dash. When built without libc fnmatch, the internal pmatch() matcher implements * by unbounded recursion over candidate positions. A local user who can plant filenames, or otherwise feed that matcher, can make a short multi-star pattern such as *.*.*.*.*.tar.gz consume excessive CPU.

Affected products

Remediation

Vendor solution

Rebuild dash with --enable-fnmatch so pathname matching uses libc fnmatch. Until then, do not run dash globs, case, or ${var#pat} / ${var%pat} against attacker-controlled names with multi-star patterns. There is no upstream backtracking bound in the internal matcher.

Red Hat statement

Red Hat rates this vulnerability as having a Moderate impact because exploitation requires local access and can only result in a denial of service through excessive CPU resource consumption, without compromising system confidentiality or integrity. Furthermore, standard builds on Red Hat Enterprise Linux utilize glibc pattern matching facilities rather than the standalone fallback implementation, significantly limiting exposure under default configurations. Exploitation is constrained to non-standard environments where internal pattern expansion is active and untrusted users are permitted to provide wildcard expressions or crafted directory structures.

Red Hat mitigation

Rebuild dash with --enable-fnmatch so pathname matching uses libc fnmatch. Until then, do not run dash globs, case, or ${var#pat} / ${var%pat} against attacker-controlled names with multi-star patterns. There is no upstream backtracking bound in the internal matcher.

Metrics

Weaknesses (1)

References (4)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner redhat
Published Sep 29, 2026
Updated Sep 30, 2026
Reserved Sep 29, 2026
CISA Vulnrichment
Updated Sep 30, 2026
NVD
Status Received
Modified Sep 29, 2026
Red Hat
Severity Moderate
Public date Sep 29, 2026