CVE-2026-6791
When expanding paths that begin with a tilde (~) followed by a username, the internal parse_tilde function extracts the username to determine the user's home directory. The implementation allocates memory for this username directly on the stack using the strndupa macro. Because the size of this allocation was determined by the length of the user-supplied input without any bounds checks, passing an excessively long username e.g. thousands of characters, forces the thread to exhaust its stack space. Thus if an application passes untrusted, attacker-controlled input to the wordexp function, an attacker can trigger a stack clash.
CSIRTS triage
- What
- A stack-based buffer overflow can occur during tilde expansion in the wordexp() function.
- Who is affected
- Systems using glibc wordexp() with untrusted tilde-prefixed input.
- Urgency
- Severity unknown (no CVSS score); potential for code execution if exploitable.
- Action
- Monitor for official glibc patch and upgrade promptly; avoid passing untrusted input to wordexp().
AI-assisted analysis generated from the source advisory — verify against the original.
⚡ Watch CVE-2026-6791
Get an email if CVE-2026-6791 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.
Exploitation outlook
- Low exploitation risk0.21% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 11% of all EPSS-scored CVEs.
Advisory coverage (2)
External references
Embed the live status
— this badge updates automatically when the KEV or exploit status changes. How to embed it →
[](https://www.csirts.com/cve/CVE-2026-6791)