Skip to main content

GNU glibc CVE-2023-6246

HIGH
Heap-based Buffer Overflow (CWE-122)
2024-01-31 secalert@redhat.com
8.4
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain local shell on glibc 2.36+ host
  2. Delivery
    Identify setuid binary invoking syslog without openlog
  3. Exploit
    execve binary with argv[0] basename >1024 bytes
  4. Install
    Overflow heap allocation in __vsyslog_internal
  5. C2
    Corrupt heap metadata via public exploit
  6. Execute
    Hijack control flow within privileged process
  7. Impact
    Gain root privileges

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires local code execution as an unprivileged user on a host running glibc 2.36 or newer, plus the presence of a setuid or setgid binary that calls syslog() or vsyslog() without first calling openlog() with a non-NULL ident - these are the exact preconditions stated in the description. The attacker must invoke that binary via execve so they control argv[0], and the basename of argv[0] must exceed 1024 bytes to trigger the overflow. Limiting factors: the CVSS vector is AV:L (no network reachability), exploitation is impossible from a remote unauthenticated position, glibc versions below 2.36 are not vulnerable, and hosts with no suitable setuid syslog-calling binary in their PATH offer no useful escalation primitive even though the libc bug is present.

Impact

The CVSS 8.4 score with AV:L/AC:L/PR:N/UI:N/C:H/I:H/A:H reflects full local compromise without prior privileges or user interaction - a profile that aligns well with practical setuid abuse. EPSS at 25.48% (96th percentile) is unusually high for a local-only flaw and is consistent with the public availability of working exploit code, which materially raises real-world risk. The vulnerability is not currently listed in CISA KEV, so there is no confirmation of active exploitation by named threat actors; the signal mix (high EPSS + public POC + no KEV) suggests it is a likely candidate for post-compromise privilege escalation in real intrusions rather than mass internet-facing exploitation. The CVSS local vector is consistent with the description's requirement to control argv[0] via execve of a setuid binary, so signals are coherent rather than conflicting. SSVC-style factors are not provided in the input, but technical impact is clearly Total (root) and exploitation is presumed Proof-of-Concept based on the publicly available exploit.

Exploit ScenarioDerived

A local unprivileged user logs into a Linux host running glibc 2.36+ (e.g., Fedora 38/39), then execve's a setuid-root binary that calls syslog without first calling openlog with a non-NULL ident, passing an attacker-crafted argv[0] whose basename exceeds 1024 bytes. The oversized program name triggers a heap overflow inside __vsyslog_internal during early process initialization, and using the publicly available exploit code the attacker corrupts heap metadata to redirect execution and gain a root shell. The attack requires only shell access on the target and no user interaction from any other principal.

Act Now Prioritize within 24-48h. Why: HIGH severity + EPSS > 10%.
No patch listed yet 25.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAI

Local privilege escalation in GNU glibc 2.36 and newer arises from a heap-based buffer overflow in __vsyslog_internal, reachable via the syslog/vsyslog interfaces when openlog was not called (or called with a NULL ident) and argv[0]'s basename exceeds 1024 bytes. Any setuid/setgid binary on affected Linux distributions (including Fedora 38 and 39) that invokes syslog can be leveraged by a local attacker to crash the process or escalate privileges to root. Publicly available exploit code exists and EPSS sits at the 96th percentile, signaling meaningful real-world risk despite the local attack vector.

RemediationAI

Upgrade glibc to a distribution-provided patched build as the primary fix: track and apply the vendor errata for your platform (e.g., Fedora updates for F38/F39 referenced from the Red Hat advisory and Bodhi, and equivalent DSA/USN/RHSA advisories from Debian, Ubuntu, and Red Hat). Where immediate patching is not feasible, the most effective compensating control is to reduce the setuid/setgid attack surface - audit setuid binaries with find / -perm -4000 and remove the setuid bit from non-essential binaries (trade-off: some admin tooling may break for non-root users), and consider mounting /tmp, /home, and user-writable filesystems with nosuid to prevent attacker-controlled setuid binaries from being staged. Mandatory access control via SELinux in enforcing mode or AppArmor profiles can further constrain post-exploitation, though it does not block the overflow itself. Disabling syslog usage in vulnerable programs is not a practical workaround since the affected function is invoked internally by libc consumers; do not rely on argv[0] length filtering at the shell layer because the attack uses execve directly.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

glibc is the GNU C Library, the standard C library underpinning virtually every userland process on mainstream Linux distributions. The flaw resides in __vsyslog_internal, the shared backend for the syslog(3) and vsyslog(3) APIs defined in syslog.h. When a process never calls openlog (or passes ident=NULL), the implementation derives the log identifier from the basename of argv[0]; the affected code path miscomputes the heap buffer size needed to hold this identifier, allowing an attacker-controlled program name longer than 1024 bytes to overflow an allocation on the heap. This is a classic CWE-122 heap-based buffer overflow, and because argv[0] is attacker-controlled across an execve boundary, any setuid/setgid binary that ultimately calls syslog without first calling openlog with a non-NULL ident is exploitable. CPE data confirms upstream gnu:glibc and Fedora 38/39 as in-scope, and the issue was introduced in glibc 2.36, so distributions shipping that or newer (e.g., Fedora 36+, Debian trixie, recent Ubuntu) inherit the vulnerable code path.

Know when Glibc gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 8.4 HIGH
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

A heap-based buffer overflow was found in the __vsyslog_internal function of the glibc library. This function is called by the syslog and vsyslog functions. This issue occurs when the openlog function was not called, or called with the ident argument set to NULL, and the program name (the basename of argv[0]) is bigger than 1024 bytes, resulting in an application crash or local privilege escalation. This issue affects glibc 2.36 and newer.

Executive ViewAI

Why It Matters

GNU glibc versions 2.36 and newer contain a local privilege escalation vulnerability affecting any setuid/setgid binary that invokes syslog functionality. Local users can escalate to root privileges; publicly available exploit code exists, and no patch is currently available from vendors.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Strip setuid/setgid bits from unnecessary binaries (chmod u-s,g-s); (2) Enforce restricted local user access policies; (3) Deploy mandatory access control (AppArmor/SELinux) to confine setuid binary capabilities; (4) Enable system call auditing (auditd) to detect exploitation via __vsyslog_internal; (5) Establish daily patch monitoring across distributions to deploy when vendor fixes become available.

Threat Intelligence Overview

EPSS Score
25.5%
Top 4% exploitable
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 25.5%
Patch available No
Active threat Yes
Deciding rule
HIGH severity + EPSS > 10%
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

87
Low Medium High Critical
KEV: 0
EPSS: +25
CVSS: +42
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Affected Products (CPE)CVE.org

cpe:2.3:a:gnu:glibc:*:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*

More in Glibc

View all
CVE-2023-4911 HIGH POC
7.8 Oct 03

Local privilege escalation in the GNU C Library (glibc) dynamic loader ld.so allows unprivileged local users on affected

CVE-2015-0235 CRITICAL POC
10.0 Jan 28

Heap-based buffer overflow in the __nss_hostname_digits_dots function in glibc 2.2, and other 2.x versions before 2.18,

CVE-2024-2961 HIGH POC
7.3 Apr 17

The iconv() function in the GNU C Library versions 2.39 and older may overflow the output buffer passed to it by up to 4

CVE-2015-7547 HIGH POC
8.1 Feb 18

Multiple stack-based buffer overflows in the (1) send_dg and (2) send_vc functions in the libresolv library in the GNU C

CVE-2014-5119 HIGH POC
7.5 Aug 29

Off-by-one error in the __gconv_translit_find function in gconv_trans.c in GNU C Library (aka glibc) allows context-depe

CVE-2012-4412 HIGH POC
7.5 Oct 09

Integer overflow in string/strcoll_l.c in the GNU C Library (aka glibc or libc6) 2.17 and earlier allows context-depende

CVE-2018-1000001 HIGH POC
7.8 Jan 31

In glibc 2.26 and earlier there is confusion in the usage of getcwd() by realpath() which can be used to write before th

CVE-2019-9169 CRITICAL POC
9.8 Feb 26

In the GNU C Library (aka glibc or libc6) through 2.29, proceed_next_node in posix/regexec.c has a heap-based buffer ove

CVE-2019-1010022 CRITICAL POC
9.8 Jul 15

GNU Libc current is affected by: Mitigation bypass. Rated critical severity (CVSS 9.8), this vulnerability is remotely e

CVE-2021-33574 CRITICAL POC
9.8 May 25

The mq_notify function in the GNU C Library (aka glibc) versions 2.32 and 2.33 has a use-after-free. Rated critical seve

CVE-2023-25139 CRITICAL POC
9.8 Feb 03

sprintf in the GNU C Library (glibc) 2.37 has a buffer overflow (out-of-bounds write) in some situations with a correct

CVE-2021-35942 CRITICAL POC
9.1 Jul 22

The wordexp function in the GNU C Library (aka glibc) through 2.33 may crash or read arbitrary memory in parse_param (in

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy