CVE-2023-45815 Viewing wget extractor output while logged in as an admin allows archived JS to execute in the admins context
Admins viewing archived pages with the wget extractor enabled risk malicious JavaScript executing with admin privileges, allowing full system compromise.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-45815?
CVE-2023-45815 is a medium-severity cross-site scripting vulnerability in ArchiveBox, published on 19 Oct 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
ArchiveBox is an open source self-hosted web archiving system. Any users who are using the `wget` extractor and view the content it outputs. The impact is potentially severe if you are logged in to the ArchiveBox admin site in the same browser session and view an archived malicious page designed to target your ArchiveBox instance. Malicious Javascript could potentially act using your logged-in admin credentials and add/remove/modify snapshots, add/remove/modify ArchiveBox users, and generally do anything an admin user could do. The impact is less severe for non-logged-in users, as malicious Javascript cannot *modify* any archives, but it can still *read* all the other archived content by fetching the snapshot index and iterating through it. Because all of ArchiveBox's archived content is served from the same host and port as the admin panel, when archived pages are viewed the JS executes in the same context as all the other archived pages (and the admin panel), defeating most of the browser's usual CORS/CSRF security protections and leading to this issue. Version 0.9.0 contains a patch. As a mitigation for this issue would be to disable the wget extractor by setting `archivebox config --set SAVE_WGET=False`, ensure you are always logged out, or serve only a [static HTML version](https://github.com/ArchiveBox/ArchiveBox/wiki/Publishing-Your-Archive#2-export-and-host-it-as-static-html) of your archive.
Weakness: CWE-79
Which versions are affected by CVE-2023-45815?
3 open source packages ship an affected version, including archivebox. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
archivebox PyPI | All versions | 0.7.0 |
archivebox PyPI | All versions | 0.9.0 |
archivebox PyPI | All versions | 0.9.0 |
Products include Archivebox Archivebox.
How do I fix CVE-2023-45815?
Upgrade archivebox to a fixed version for your release line: 0.7.0 or 0.9.0.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2023-45815 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-45815 exists.
Other vulnerabilities in ArchiveBox
Sources
Also known as GHSA-cr45-98w9-gwqx, PYSEC-2023-229.