CVE-2026-18370

Heap-based buffer overflow in entr

Published Aug 10, 2026 CVSS 4.0 · 4.8 Medium EPSS < 1% KEV · Not listed
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

Analysis

AI-generated

Technical impact

The vulnerability is a heap‑based buffer overflow (CWE-122) located in the run_utility() function of entr. It allocates a fixed buffer of size ARG_MAX and then copies command‑line arguments into it. Because strlcpy() reports the total length of the source string rather than the number of bytes written, the code incorrectly advances the destination pointer by the full source length. When the buffer is exactly filled, the remaining size underflows as an unsigned value, causing subsequent copies to write past the buffer’s end. This can be triggered by carefully crafted arguments whose combined length precisely fills the buffer or by using the /_ substitution feature, which expands short tokens into longer pathnames at runtime. The overflow leads to memory corruption, can cause the process to abort, and results in a denial of service for the local attacker.

Affected Systems

The affected product is entr, released by Eradman. No specific affected version ranges are listed; the issue is present in versions prior to the commit that fixes the overflow.

Risk and Exploitability

The CVSS score of 4.8 indicates a low‑to‑medium severity. The EPSS score of 0.00131 suggests a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. Attackers would need local access and the ability to invoke entr with a crafted argument list or to exploit the /_ substitution. The impact is limited to memory corruption and possible process termination, which translates into a denial of service for the process or affected host.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the patch that implements commit 2467fe0 to update entr to a version where the overflow has been repaired.
  • If an update cannot be applied immediately, limit entr usage to trusted inputs only and disable the use of the /_ substitution feature to avoid the overflow condition.
  • Monitor system logs and process state for abnormal termination or memory corruption events; if repeat failures occur, modify or remove entr from the workload until a patched version is available.

Generated by OpenCVE AI on August 14, 2026 at 02:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Eradman
Eradman entr
Vendors & Products Eradman
Eradman entr
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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
Title Heap-based buffer overflow in entr
Weaknesses CWE-122
References
Metrics cvssV4_0

{'score': 4.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
CERT-PL
Published
Updated
Aug 10, 2026, 5:59 PM
Reserved
Jul 30, 2026, 10:05 AM
Status
Deferred
Published
Aug 10, 2026, 1:17 PM
Modified
Oct 23, 2026, 8:10 PM
Severity
Moderate
Public date
Aug 10, 2026, 12:56 PM