6.6
MEDIUM CVSS 4.0
CVE-2026-6791
Potential stack-based buffer clash during tilde expansion in wordexp
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.

INFO

Published Date :

Aug. 10, 2026, 7:17 p.m.

Last Modified :

Aug. 10, 2026, 7:17 p.m.

Remotely Exploit :

Yes !

Source :

3ff69d7a-14f2-4f67-a097-88dee7810d18
Affected Products

The following products are affected by CVE-2026-6791 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 4.0 MEDIUM 3ff69d7a-14f2-4f67-a097-88dee7810d18
CVSS 4.0 MEDIUM 3ff69d7a-14f2-4f67-a097-88dee7810d18
Solution
Fix stack buffer overflow by validating username length before memory allocation.
  • Validate input username length before allocation.
  • Ensure proper bounds checking for stack allocations.
  • Apply security patches when available.
  • Review and sanitize all user inputs.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-6791.

URL Resource
https://sourceware.org/bugzilla/show_bug.cgi?id=34091
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-6791 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-6791 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-6791 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-6791 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by 3ff69d7a-14f2-4f67-a097-88dee7810d18

    Aug. 10, 2026

    Action Type Old Value New Value
    Added Affected [{'repo': 'https://sourceware.org/git/?p=glibc.git', 'vendor': 'The GNU C Library', 'product': 'glibc', 'versions': [{'status': 'affected', 'version': '2.0', 'versionType': 'custom', 'lessThanOrEqual': '2.43'}], 'platforms': ['Linux'], 'packageName': 'glibc', 'collectionURL': 'https://sourceware.org/glibc/', 'defaultStatus': 'unaffected'}]
    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.
    Added CVSS V4.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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-121
    Added Reference https://sourceware.org/bugzilla/show_bug.cgi?id=34091
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.