CVE-2024-39840 is a remote code execution vulnerability in Factorio before version 1.1.101. The vulnerability arises from the game's support for custom maps, which can include Lua scripts. Certain Lua base module functions are insufficiently restricted, allowing a crafted server to deliver a custom map that executes arbitrary Lua bytecode on connecting clients. This can be abused to generate fake objects and execute arbitrary code on the client system.
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 contains a single Lua exploit script (exp.lua) and a brief readme. The exploit targets Factorio version 1.1.86, specifically its embedded Lua environment, as referenced in the linked writeup (https://memorycorruption.net/posts/rce-lua-factorio/). The script demonstrates advanced memory manipulation primitives in Lua, such as arbitrary read/write and address leaking, by exploiting denormalized double values and Lua's internal structures. It crafts fake objects in memory to gain arbitrary read/write, locates the base address of libc, parses ELF headers to find the address of the 'system' function, and overwrites function pointers to execute arbitrary shell commands. The default payload launches 'kcalc', but the script includes a commented-out reverse shell payload using /dev/tcp/127.0.0.1/9001. The exploit is operational and demonstrates full remote code execution capabilities on a vulnerable Factorio instance. The repository is well-structured for a single-file exploit, with all logic contained in exp.lua and a readme referencing the original research.
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.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.
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.