ArchiveBox RCE via Unvalidated Configuration Overrides
ArchiveBox versions 0.8.6rc0 and earlier are vulnerable to remote code execution (RCE) due to unvalidated configuration overrides in the AddView (/add/ endpoint) allowing arbitrary command execution.
ArchiveBox versions up to and including 0.8.6rc0 are susceptible to a critical remote code execution (RCE) vulnerability. The vulnerability stems from the /add/ endpoint (AddView in core/views.py), which accepts a config JSON field. This field is merged into the crawl configuration without proper validation. When PUBLIC_ADD_VIEW=True, this allows unauthenticated users to inject arbitrary tool arguments, leading to command execution on the server. This is achieved by manipulating environment variables used by archive plugins like yt-dlp and gallery-dl. The endpoint is also @csrf_exempt, further easing exploitation. Exploitation allows attackers to execute arbitrary commands on the ArchiveBox server, potentially leading to complete system compromise.
Attack Chain
- An unauthenticated attacker (when
PUBLIC_ADD_VIEW=True) sends a POST request to the/add/endpoint. - The attacker includes a
configparameter in the POST data containing a JSON object. - This JSON object includes a key like
YTDLP_ARGS_EXTRAorGALLERYDL_ARGS_EXTRAwith a crafted value. - The
AddViewincore/views.pyextracts theconfigdata without validation. - The extracted configuration is merged into the crawl configuration.
- The crawl configuration is exported as environment variables.
- The yt-dlp or gallery-dl plugin executes, using the injected environment variables as arguments.
- The attacker-controlled arguments, such as
--exec "id > /tmp/pwned", are passed to yt-dlp or gallery-dl, resulting in arbitrary command execution.
Impact
Successful exploitation allows unauthenticated attackers to execute arbitrary commands on the ArchiveBox server. The impact includes potential for complete system compromise, data exfiltration, or denial-of-service. This vulnerability is particularly critical when the PUBLIC_ADD_VIEW setting is enabled, which is a common configuration for bookmarklet usage, making the attack pre-authentication.
Recommendation
- Upgrade to a patched version of ArchiveBox beyond 0.8.6rc0 to remediate CVE-2026-42601.
- As a temporary mitigation, disable the
PUBLIC_ADD_VIEWsetting to prevent unauthenticated access to the vulnerable endpoint. - Deploy the Sigma rule “Detect ArchiveBox Configuration Injection” to identify attempts to inject malicious configurations via the
/add/endpoint. - Monitor web server logs for POST requests to
/add/containing aconfigparameter with suspicious values in keys such asYTDLP_ARGS_EXTRAorGALLERYDL_ARGS_EXTRA.
Detection coverage 2
Detect ArchiveBox Configuration Injection
criticalDetects attempts to inject malicious configurations via the /add/ endpoint by looking for suspicious values in the config parameter.
Detect ArchiveBox Suspicious Process Execution via YTDLP
highDetects suspicious process execution via yt-dlp with injected arguments after ArchiveBox exploitation.
Detection queries are kept inside the platform. Get full rules →