Buffer overflow in The GNU C Library Glibc

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.

Vulnerability class: Buffer Overflow

Published · last modified .

EPSS exploit prediction

EPSS: 0.003 (23.6th percentile), scored .

Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 24th percentile — 23.6% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2026-6791: held from 0.002 to 0.003.

EPSS over last 30 days · oldest: 0.002 · newest: 0.003 · change: +0.001

Affected products

Weakness classification (CWE)

References