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

No CVSS.

Configurations

No configuration.

History

23 Oct 2026, 19:10

Type Values Removed Values Added
Summary
  • (es) Al expandir rutas que comienzan con una tilde (~) seguida de un nombre de usuario, la función interna parse_tilde extrae el nombre de usuario para determinar el directorio de inicio del usuario. La implementación asigna memoria para este nombre de usuario directamente en la pila utilizando la macro strndupa. Debido a que el tamaño de esta asignación se determinó por la longitud de la entrada proporcionada por el usuario sin ninguna comprobación de límites, pasar un nombre de usuario excesivamente largo, por ejemplo, miles de caracteres, obliga al hilo a agotar su espacio de pila. Así, si una aplicación pasa entrada no confiable, controlada por el atacante, a la función wordexp, un atacante puede desencadenar un ’stack clash’.

Information

Published : 2026-08-10 19:17

Updated : 2026-10-24 16:10


NVD link : CVE-2026-6791

Mitre link : CVE-2026-6791

CVE.ORG link : CVE-2026-6791


JSON object : View

Products Affected

No product.

CWE
CWE-121

Stack-based Buffer Overflow