CVE-2026-42420: OpenClaw: Multiple Code Paths Missing Base64 Pre-Allocation Size Checks
OpenClaw, the open-source AI assistant, decoded base64 input in several code paths before checking the decoded size. Crafted base64 from a low-privilege caller can exhaust memory and crash the process. The openclaw npm package up to 2026.4.2 is affected. Upgrade to 2026.4.8.
Published Apr 9, 2026 · Updated May 6, 2026 · Analysis Nov 6, 2026
What an attacker can do
Several base64 decode paths allocate the output buffer first and enforce the decoded-size limit afterwards. A small encoded string can claim a very large decoded size, and the allocation happens before the limit is checked. The weakness is CWE-770, allocation of resources without limits.
The result is memory exhaustion and denial of service. VulnCheck lists the vector as network, low privileges, no user interaction, with availability impact only. Neither source names the specific inputs or code paths, so we cannot say which endpoint or channel is the easiest to hit.
In practice this is a crash risk for a gateway that accepts base64 content from authenticated users or connected channels. It does not expose data or give code execution. The advisory scopes the issue to OpenClaw as a user-controlled local assistant, not a multi-tenant service, which lowers the realistic risk for a single-user install. Teams that expose a shared gateway to several users or bots should patch first.
Who is affected
The openclaw npm package at 2026.4.2 and below. VulnCheck lists all versions before 2026.4.8 as affected. Check the installed version:
npm ls openclawopenclaw
- Ecosystem
- npm
- Affected
- < 2026.4.8
- Fixed in
- 2026.4.8
- Check
npm ls openclaw
How to fix it
Upgrade openclaw to 2026.4.8 or later.
npm install [email protected]The fix is commit d7c3210cd6f5, which the advisory says was checked on main with regression tests. No workaround is given. Until you upgrade, limit who can send input to the gateway and run it under a memory limit, such as a container or systemd cap, so a crash does not take down the host.
How to tell if you were hit
Look for OpenClaw process restarts, out-of-memory kills and sudden memory growth, for example OOM entries in the system log or container restarts. Match them against requests that carry unusually large base64 fields. The sources give no specific log line.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
Multiple Code Paths Missing Base64 Pre-Allocation Size Checks.
Several base64 decode paths could allocate before enforcing decoded-size limits.
OpenClaw is a user-controlled local assistant. This advisory is scoped to the OpenClaw trust model and does not assume a multi-tenant service boundary.
Affected Packages / Versions
- Package:
openclaw(npm) - Affected versions:
<=v2026.4.2 - Patched versions:
2026.4.8
Fix
The issue was fixed on main and is available in the patched npm version listed above. The verified fixed tree is commit d7c3210cd6f5fdfdc1beff4c9541673e814354d5.
Verification
The fix was re-checked against main before publication, including targeted regression tests for the affected security boundary.
Credits
Thanks @zsxsoft and @KeenSecurityLab for reporting.
Credited to zsxsoft, KeenSecurityLab.
Questions
- Can this give code execution?
No. Both sources describe only memory exhaustion and denial of service, with availability as the sole impact.
- Which code paths are affected?
The sources say several base64 decode paths but do not list them.
- Which version fixes CVE-2026-42420?
openclaw 2026.4.8. Versions before it are affected, and the advisory lists 2026.4.2 and below.
- Does it need authentication?
The CVSS vector lists low privileges, so an authenticated or connected caller is assumed.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
