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.
History

Wed, 12 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 12 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-120
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate


Tue, 11 Aug 2026 03:15:00 +0000

Type Values Removed Values Added
First Time appeared The Gnu C Library
The Gnu C Library glibc
Vendors & Products The Gnu C Library
The Gnu C Library glibc

Mon, 10 Aug 2026 19:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Potential stack-based buffer clash during tilde expansion in wordexp
Weaknesses CWE-121
References
Metrics cvssV4_0

{'score': 6.6, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:L/SA:H/E:U'}


cve-icon MITRE

Status: PUBLISHED

Assigner: glibc

Published: 2026-08-10T18:41:25.122Z

Updated: 2026-08-12T18:01:38.950Z

Reserved: 2026-04-21T13:48:45.449Z

Link: CVE-2026-6791

cve-icon Vulnrichment

Updated: 2026-08-12T18:01:33.827Z

cve-icon NVD

Status : Received

Published: 2026-08-10T19:17:30.877

Modified: 2026-08-12T18:18:11.703

Link: CVE-2026-6791

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-10T18:41:25Z

Links: CVE-2026-6791 - Bugzilla