CVE-2026-4040 is an information disclosure vulnerability in OpenClaw up to version 2026.2.17. The issue affects the tools.exec.safeBins function in the File Existence Handler / safeBins approval flow. Due to discrepant behavior in allow/deny decisions based on whether candidate filesystem paths exist on the host, an attacker can use the interface as a file-existence oracle. The vulnerable logic appears to evaluate command arguments in a way that causes different outcomes when file-oriented flags reference existing versus non-existing paths, leaking information about the local filesystem. The vendor indicates the fix makes safe-bin validation deterministic based on argv only and blocks file-oriented flags in safe-bin mode. The issue is local in attack scope.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a small proof-of-concept exploit/demo for a race condition in a Flask file upload workflow, labeled as CVE-2026-4040. It contains two Python programs: `upload_server.py`, which implements the intentionally vulnerable Flask upload service, and `exploit_race_upload.py`, which submits a crafted upload and concurrently scans for temporary files to exploit the time-of-check/time-of-use gap. The vulnerable server writes an uploaded file to a temporary path under `/tmp/uploads` using `tempfile.mkstemp`, then validates only that the original filename ends with `.txt`, sleeps for 0.5 seconds, and finally renames the temporary file to its final name. This creates a race window where attacker-controlled content exists on disk before validation/move completes. The exploit uploads a file named `payload.py.txt` containing Python code `import os; os.system("id > /tmp/pwned")`, which is intended to masquerade as an allowed text file while still carrying executable content. The exploit capability is limited but clear: it demonstrates arbitrary command execution by planting a script payload and attempting to access temporary files matching `/tmp/uploads/tmp*` during the vulnerable window. In the provided code, the `execute_temp()` thread only scans and opens candidate temp files and does not actually trigger remote execution via a web server; comments indicate that in a real attack this step would involve repeatedly requesting or executing the temporary file through another reachable execution path. As such, the repository is best understood as an operational demo of the race/upload primitive and payload staging rather than a fully weaponized end-to-end RCE exploit. Repository structure is minimal: `README.md` explains the vulnerability and usage, `upload_server.py` is the vulnerable target, `exploit_race_upload.py` is the attacker script, and `LICENSE` is standard MIT text. No external exploit framework is used.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.