CVE-2023-40305
Medium · 5.5CVSS
5.5
EPSS
0.4%
Published
Aug 14, 2023
CISA due date
—
Cloudanix analysis
A bug in a code formatting program can cause it to crash when given a specially made file, interrupting software development tasks.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in search_brace function of indent.c triggered by a crafted input file, resulting in memory corruption and potential denial of service.
Why it matters to the business
Crashes the code formatting tool when handling malicious files, disrupting development workflows and automated build processes that depend on GNU indent.
How an attack unfolds
An attacker creates a malicious source file that overflows the heap buffer inside search_brace; when the file is processed by indent the overflow occurs, causing a crash or memory corruption that may be leveraged for further attacks.
How to fix it
Upgrade to a patched version of GNU indent once released; process only trusted input files until a fix is available.
How to confirm the fix worked
Confirm GNU indent version is updated; test with known trigger files to verify absence of crashes.
Typical attack path
- Craft a malicious input file targeting the search_brace buffer
- Invoke GNU indent against the crafted file
- Trigger the heap overflow leading to application crash or memory corruption
How to detect it
Monitor system and application logs for segmentation faults or crashes involving the indent process when processing source files.
What your security team should do
- Restrict GNU indent to trusted files only
- Monitor upstream for security updates and apply them promptly
- Evaluate alternative formatting tools if no patch becomes available
The record
GNU indent 2.2.13 has a heap-based buffer overflow in search_brace in indent.c via a crafted file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | indent | 0 | 2.2.12-1+deb11u1 |
| Debian:12 | indent | 0 | 2.2.12-4+deb12u2 |
| Debian:13 | indent | 0 | 2.2.13-3 |
| Mageia:8 | indent | 0 | 2.2.13-1.1.mga8 |
| Mageia:9 | indent | 0 | 2.2.13-1.1.mga9 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP4 | indent | 0 | 2.2.11-150000.3.6.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP5 | indent | 0 | 2.2.11-150000.3.6.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | indent | 0 | 2.2.10-38.6.1 |
| Ubuntu:16.04:LTS | indent | 0 | No fix |
| Ubuntu:18.04:LTS | indent | 0 | No fix |
| Ubuntu:20.04:LTS | indent | 0 | 2.2.12-1ubuntu0.20.04.1 |
| Ubuntu:22.04:LTS | indent | 0 | 2.2.12-1ubuntu0.22.04.1 |
| Ubuntu:24.04:LTS | indent | 0 | 2.2.13-3 |
| Ubuntu:Pro:16.04:LTS | indent | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | indent | 0 | No fix |
| openSUSE:Leap 15.4 | indent | 0 | 2.2.11-150000.3.6.1 |
| openSUSE:Leap 15.5 | indent | 0 | 2.2.11-150000.3.6.1 |
| openSUSE:Tumbleweed | indent | 0 | 2.2.13-2.1 |
Related vulnerabilities
- CVE-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787
- CVE-2026-89085 A flaw was found in parted. CWE-787
- CVE-2026-85746 MariaDB server is a community developed fork of MySQL server. CWE-787
- CVE-2026-107815 MariaDB server is a community developed fork of MySQL server. CWE-787
- CVE-2026-56851 The Nickname profile can panic with an out-of-bounds slice error when transforming… CWE-787