CVE-2026-18370
Received Received - Intake

Heap-based Buffer Overflow in entr

Vulnerability report for CVE-2026-18370, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-10

Last updated on: 2026-08-10

Assigner: CERT.PL

Description

entr is vulnerable to Heap-based buffer overflow in run_utility() function. The function allocates a fixed-size heap buffer using malloc(ARG_MAX) and copies command-line arguments into it. It advances the destination pointer based on the return value of strlcpy(), which returns the total length of the source string rather than the number of bytes written.Β When the buffer is exactly filled, the remaining size underflows as an unsigned size_t, causing subsequent copies to write out of bounds. This can be triggered by supplying command-line arguments whose combined length fills the buffer, or via the /_ substitution feature which expands a short token into a longer pathname at runtime. The local attacker can cause memory corruption, process abort, and denial of service.Β  This issue was fixed in commitΒ 2467fe0

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-10
Last Modified
2026-08-10
Generated
2026-08-10
AI Q&A
2026-08-10
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-122 A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a heap-based buffer overflow in the entr utility's run_utility() function. The function allocates a fixed-size buffer using malloc(ARG_MAX) and copies command-line arguments into it. It incorrectly calculates remaining space by using strlcpy()'s return value, which reports the source string length rather than bytes written. When the buffer is exactly filled, the remaining size underflows as an unsigned size_t, causing out-of-bounds writes. Attackers can exploit this by providing overly long arguments or using the /_ substitution feature to expand short tokens into longer paths.

Detection Guidance

To detect this vulnerability, check the version of entr installed on your system. Vulnerable versions are up to and including 5.8. Run `entr --version` to verify. If the version is 5.8 or lower, the system is potentially affected. Additionally, monitor for crashes or memory corruption when entr processes long command-line arguments or uses the /_ substitution feature.

Impact Analysis

An attacker could exploit this to cause memory corruption, crash the process, or trigger a denial of service. This might lead to application instability, data corruption, or unauthorized code execution depending on the system configuration. Local attackers with access to run entr commands could leverage this to disrupt services or gain control over affected systems.

Mitigation Strategies

Update entr to a version that includes the fix in commit 2467fe0. If updating is not immediately possible, avoid using entr with untrusted or overly long command-line arguments. Disable the /_ substitution feature if enabled. Monitor system logs for crashes or memory corruption events related to entr processes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-18370. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart