CVE-2026-18370: Heap-based buffer overflow in entr
entr is vulnerable to Heap-based buffer overflow in runutility() function. The function allocates a fixed-size heap buffer using malloc(ARGMAX) 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 sizet, 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
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
entrto a version that resolves this vulnerability.Patch 2467fe0
Event History
Frequently Asked Questions
What is the severity of CVE-2026-18370?
CVE-2026-18370 has a risk score of 37, indicating a medium level of severity.
How does CVE-2026-18370 affect entr?
CVE-2026-18370 affects the entr application by introducing a heap-based buffer overflow vulnerability in the run_utility() function.
What causes the vulnerability in CVE-2026-18370?
CVE-2026-18370 is caused by the use of malloc(ARG_MAX) to allocate a fixed-size heap buffer that is vulnerable to overflow when copying command-line arguments.
How can I mitigate CVE-2026-18370?
To mitigate CVE-2026-18370, ensure that you update entr to the latest version that patches this vulnerability.
Are there any known exploits for CVE-2026-18370?
As of now, there are no publicly disclosed exploits specifically targeting CVE-2026-18370.