Skip to main content

entr CVE-2026-18370

| EUVDEUVD-2026-55623 MEDIUM
Heap-based Buffer Overflow (CWE-122)
2026-08-10 cvd@cert.pl GHSA-qpgw-rgmq-2367
4.8
CVSS 4.0 · Vendor: cert
View

Attack ChainAIDerived

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

  1. Recon
    Gain local user shell access
  2. Delivery
    Invoke entr with crafted arguments or monitored path via /_ substitution
  3. Exploit
    run_utility() allocates fixed ARG_MAX heap buffer
  4. Install
    strlcpy return value advances pointer past buffer end
  5. C2
    Unsigned remaining-size counter underflows to near SIZE_MAX
  6. Execute
    Out-of-bounds heap write corrupts adjacent memory
  7. Impact
    Process aborts with denial of service

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 shell access to a system where entr is installed and the attacker can invoke it directly or influence the arguments passed to it by an automated script. Any standard (non-root) user account suffices - the CVSS vector specifies PR:L. The specific trigger condition is that the combined byte length of command-line arguments fills the ARG_MAX heap buffer exactly, OR that the slash-underscore substitution feature is active (entr is invoked with the /_ token) and the leading-edge monitored filename expands to a length that causes the underflow. No network connectivity or remote access is required; this is a purely local attack. Privilege escalation beyond process disruption is not indicated by the available data. The vulnerability does not affect systems where entr is not installed or not accessible to the attacker's user account.

Impact

The CVSS 4.0 score of 4.8 accurately reflects the narrow blast radius: attack vector is local, privileges required are low, and impact is confined to limited integrity and availability degradation on the vulnerable system with no confidentiality exposure. EPSS data was not included in the provided intelligence, and the vulnerability does not appear in CISA KEV, meaning neither probabilistic exploitation likelihood nor confirmed active exploitation is established. No public proof-of-concept has been identified. The denial-of-service outcome - process abort and heap corruption - is most consequential in unattended CI/CD pipelines or automated developer workflows where entr is embedded in a build loop, since repeated triggering could cause persistent workflow disruption without obvious logging. Even a mid-sized municipal IT team in gniezno relying on entr-based automation for infrastructure monitoring scripts should treat this as a standard patch cycle item rather than an emergency response, given the absence of remote exploitability and confirmed exploitation. The primary threat model is a malicious or compromised local user disrupting developer tooling, not a pathway to privilege escalation or lateral movement.

Exploit ScenarioDerived

A local user with a standard shell account crafts a set of command-line arguments for entr whose combined length exactly fills the ARG_MAX-byte heap buffer, or monitors a file via the slash-underscore substitution feature whose pathname expands to a length sufficient to fill the buffer. When entr's run_utility() is invoked in response to a file change event, the strlcpy return-value misuse causes the unsigned remaining-size counter to wrap around to near SIZE_MAX, and the next copy writes arbitrarily far past the end of the heap allocation, corrupting adjacent heap metadata and causing a process abort. No public proof-of-concept has been identified, but the bug is mechanically straightforward to reproduce locally given knowledge of the ARG_MAX boundary and the strlcpy behavior.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 10, 2026

Heap buffer overflow in entr's run_utility() function allows a local low-privileged user to trigger memory corruption, process abort, and denial of service by supplying crafted command-line arguments or by using the slash-underscore substitution feature, which expands a short token into a longer pathname at runtime. The flaw stems from incorrect use of strlcpy()'s return value - which reflects the total source length rather than bytes written - to advance a destination pointer, causing an unsigned size_t underflow in the remaining-buffer counter and subsequent out-of-bounds heap writes. No public exploit has been identified and this vulnerability is absent from CISA KEV; an upstream fix is available via commit 2467fe0.

RemediationAI

The primary remediation is to update entr to a version that incorporates commit 2467fe0aa5f2b1b074110a9186ef51d35809c9a4 or later; this commit replaces the unsafe strlcpy-based pointer arithmetic with explicit strlen-based bounds enforcement followed by memcpy, and adds a null-pointer check on malloc. No specific tagged release version number incorporating this fix has been confirmed in the available data - users should check the entr project page at https://eradman.com/entrproject/ and the GitHub repository for a tagged release or distribution package that includes or supersedes this commit. Users of package managers such as Homebrew, apt, or pkg should monitor their respective repositories for updated entr packages. As a compensating control where patching is not immediately possible, operators should restrict the arguments passed to entr in automated scripts so that combined argument lengths remain well below ARG_MAX, and should avoid use of the slash-underscore substitution feature with file paths of unpredictable or attacker-influenced length. If entr is not required in a given environment, removing it eliminates the attack surface entirely with no functional trade-off.

Affected VersionsENISA

entr 0 ≤5.8

Affected Packages

euvd entr no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

entr is an open-source, BSD-licensed file-watching utility that executes user-specified shell commands whenever monitored files change, commonly used in developer build loops and CI pipelines. The vulnerable function run_utility() allocates a fixed-size heap buffer of ARG_MAX bytes via malloc() and iterates over command-line arguments to clone them into this buffer on each invocation. The root cause is CWE-122 (Heap-based Buffer Overflow) arising from misuse of strlcpy(): the POSIX strlcpy() function returns the total length of the source string - not the number of bytes actually copied, which is capped by the size parameter. The original code used this uncapped return value to advance the destination pointer p, so when a string exactly fills remaining buffer space, the expression ARG_MAX - (p - arg_buf) wraps around to a very large unsigned value on the next iteration, and the subsequent copy writes arbitrarily far beyond the heap allocation. The slash-underscore substitution feature exacerbates this by replacing a short literal token with a full filesystem pathname at runtime, making the overflow triggerable without obviously long argument strings. The fix in commit 2467fe0 replaces strlcpy with an explicit strlen-based bounds check followed by memcpy, tracks remaining capacity in a dedicated rem variable decremented after each copy, and adds a null-pointer guard on the malloc return.

Know when the next one hits your stack

  • 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

Vendor (cert) PRIMARY 4.8 MEDIUM
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
vuln.today AI 4.4 MEDIUM

Local attack with low-privilege shell access required; no confidentiality impact, only limited heap corruption and process abort affecting integrity and availability.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Red Hat 5.5 MEDIUM

Primary rating from Vendor (cert).

CVSS VectorVendor: cert

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
niche developer file-watcher tool, limited production deployment footprint
Data Quality
9 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

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.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

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