CVE-2026-6791
Wolfi vulnerability analysis and mitigation

Overview

CVE-2026-6791 is a stack-based buffer overflow (stack clash) vulnerability in the GNU C Library (glibc) affecting the wordexp function's tilde-expansion logic. When processing paths beginning with ~<username>, the internal parse_tilde function allocates memory for the username on the stack via the strndupa macro without any bounds checking, allowing an attacker-controlled excessively long username to exhaust the thread's stack space. Affected versions span glibc 2.0 through 2.43. It was published on August 10, 2026, with a CVSS v3.1 score of 5.9 (Medium) and a CVSS v4.0 score of 6.6 (Medium) (Github Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified as CWE-121 (Stack-based Buffer Overflow) and CWE-120 (Buffer Copy without Checking Size of Input). The vulnerable code path is in glibc's parse_tilde function, which uses strndupa — a macro that allocates memory on the stack — to copy a username extracted from user-supplied input. Because the allocation size is derived directly from the input length with no upper bound enforced, supplying a username of thousands of characters causes the thread stack to be exhausted, triggering a stack clash condition. Exploitation requires that an application pass attacker-controlled input directly to the wordexp function, making the attack surface limited to applications that process untrusted tilde-expansion paths (Github Advisory, Red Hat Bugzilla).

Impact

Successful exploitation results in a Denial of Service (DoS) by crashing the affected application through stack exhaustion. The primary impact is on availability — the vulnerable thread's stack is exhausted, causing the application to crash or become unresponsive. There is no evidence of confidentiality or integrity impact beyond what is reflected in the CVSS v4.0 score's minor secondary system impacts, and lateral movement or data exfiltration are not considered realistic outcomes of this vulnerability (Github Advisory, Red Hat Bugzilla).

Exploitability

There is no known public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.207%, placing it in the 11th percentile for exploitation likelihood within 30 days. The NVD SSVC assessment also rates exploitation as "none" and the vulnerability as non-automatable, reflecting the requirement that the target application must pass untrusted input to wordexp. The CVE is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.

Exploitation steps

  1. Identify a vulnerable target: Find an application that uses glibc's wordexp function to process user-supplied input, particularly paths that may begin with a tilde (~) followed by a username, running on a system with glibc 2.0–2.43.
  2. Craft a malicious input: Construct a string of the form ~<username> where <username> is an excessively long string (e.g., thousands of characters, such as ~ followed by 10,000 A characters).
  3. Deliver the payload: Submit the crafted string as input to the vulnerable application through whatever interface it exposes (e.g., a web form, API endpoint, command-line argument, or file path field) that ultimately passes the value to wordexp.
  4. Trigger stack exhaustion: The parse_tilde function within glibc's wordexp implementation calls strndupa with the attacker-controlled length, allocating the oversized buffer on the stack and exhausting the thread's stack space, resulting in a stack clash and application crash (Github Advisory, Red Hat Bugzilla).

Indicators of compromise

  • Logs: Application crash logs or core dumps referencing stack overflow or segmentation faults in threads processing path expansion; system logs (/var/log/syslog, journalctl) showing unexpected application termination.
  • Process: Abnormal termination (SIGSEGV or SIGABRT) of processes that use wordexp, particularly those handling user-supplied file paths.
  • Network: Repeated requests to an application endpoint that accepts path or filename input, especially containing long strings prefixed with ~, which may indicate probing or exploitation attempts.

Mitigation and workarounds

Update glibc to a patched version beyond 2.43 once available from the upstream GNU C Library maintainers or your Linux distribution vendor (e.g., Red Hat, Debian, Wolfi). As a workaround, applications should validate and enforce a maximum length on usernames in tilde-expansion paths before passing them to wordexp, or avoid using wordexp on untrusted input entirely in favor of alternative path expansion mechanisms with proper input validation. Monitor the upstream glibc bug tracker (sourceware.org Bugzilla #34091) and your distribution's security advisories for patch availability (Github Advisory, Red Hat Bugzilla).

Community reactions

Coverage has been limited to security aggregators and Linux distribution security channels. The Yocto Project security mailing list and Solus Linux community forums have noted the vulnerability in the context of package updates. The German Linux news site Pro-Linux.de covered it as part of a broader glibc security advisory. No notable researcher commentary or significant social media discussion has been identified beyond routine CVE tracking.

Additional resources


SourceThis report was generated using AI

Related Wolfi vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-49244MEDIUM5.9
  • Wolfi logoWolfi
  • sftpgo
NoYesAug 20, 2026
CVE-2026-70654MEDIUM5.8
  • Wolfi logoWolfi
  • libvips
NoYesAug 20, 2026
CVE-2026-70653MEDIUM4.8
  • Wolfi logoWolfi
  • libvips
NoYesAug 20, 2026
CVE-2026-49245LOW3.7
  • Wolfi logoWolfi
  • github.com/drakkan/sftpgo
NoYesAug 20, 2026
CVE-2026-70652LOW2
  • Wolfi logoWolfi
  • libvips
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management