Skip to main content
EPSS 0.2%top 89%

CVE-2026-6791: CWE-121 Stack-based buffer overflow in The GNU C Library glibc

0
Medium
VulnerabilityCVE-2026-6791cvecve-2026-6791cwe-121
Published: 08/10/2026 (08/10/2026, 18:41:25 UTC)
Source: CVE Database V5
Vendor/Project: The GNU C Library
Product: glibc

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.

CVSS v4.0

Score 6.6medium

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
Low
Subsq. Availability
High
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

Affected software

The GNU C Library

glibc

Affected versions
>=2.0 <=2.43
debian/glibc
pkg:deb/debian/glibc
Affected versions
=2.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/10/2026, 19:17:36 UTC

Technical Analysis

The vulnerability arises from the parse_tilde function in glibc's wordexp implementation, which uses the strndupa macro to allocate stack memory for a username extracted from a tilde-prefixed path. Because the allocation size is based directly on the length of attacker-controlled input without bounds checking, an excessively long username can exhaust the thread's stack space, leading to a stack-based buffer overflow (CWE-121). This can be triggered if an application passes untrusted input to the wordexp function. The vulnerability is identified as CVE-2026-6791 and affects glibc version 2.0. The CVSS 4.0 score is 6.6 (medium severity). No known exploits are reported in the wild, and no official remediation or patch has been published yet.

Potential Impact

An attacker who can supply untrusted input to the wordexp function can cause a stack clash by overflowing the stack with an excessively long username. This may lead to application crashes or potentially enable further exploitation depending on the context. The impact is limited by the requirement for attacker-controlled input to wordexp and the high attack complexity indicated by the CVSS vector.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid passing untrusted or attacker-controlled input to the wordexp function or any functionality that expands tilde-prefixed paths with usernames.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
glibc
Date Reserved
2026-04-21T13:48:45.449Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a7a1efbbf8831d5395b0eb7

Added to database: 08/10/2026, 18:56:59 UTC

Last enriched: 08/10/2026, 19:17:36 UTC

Last updated: 09/23/2026, 01:47:44 UTC

Views: 79

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses