# CVE-2024-30248: Piccolo Admin's raw SVG loading may lead to complete data compromise from admin page

> Attackers can upload malicious SVG files to the Piccolo Admin panel, leading to arbitrary code execution and data compromise via XSS.

- **Severity:** High 7.7 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`)
- **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:** Yes
- **Published:** 2 Apr 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-pmww-v6c9-7p83, PYSEC-2026-1780

## What is CVE-2024-30248?

CVE-2024-30248 is a high-severity cross-site scripting vulnerability in piccolo-orm piccolo_admin, published on 2 Apr 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Piccolo Admin is an admin interface/content management system for Python, built on top of Piccolo. Piccolo's admin panel allows media files to be uploaded. As a default, SVG is an allowed file type for upload. An attacker can upload an SVG which when loaded can allow arbitrary access to the admin page. This vulnerability was patched in version 1.3.2.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2024-30248?

3 open source packages ship an affected version, including piccolo-admin.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `piccolo-admin` | PyPI | From 1.2.0 | 1.3.2 |
| `piccolo-admin` | PyPI | From 1.2.0 | 1.3.2 |
| `piccolo-admin` | PyPI | From 1.2.0 | 1.3.2 |

## How do I fix CVE-2024-30248?

Upgrade piccolo-admin to 1.3.2 or later.

## Is CVE-2024-30248 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-30248 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-30248 and fix it if it is affected.

What it is: CVE-2024-30248 is a high-severity cross-site scripting vulnerability in piccolo-orm piccolo_admin, published on 2 Apr 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-30248 exists.

Affected packages and fixed versions:
- piccolo-admin (PyPI): affected from 1.2.0; fixed in 1.3.2
- piccolo-admin (PyPI): affected from 1.2.0; fixed in 1.3.2
- piccolo-admin (PyPI): affected from 1.2.0; fixed in 1.3.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-30248/ (Markdown: https://insights.sbomify.com/CVE-2024-30248/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-30248
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-30248
- OSV: https://osv.dev/vulnerability/CVE-2024-30248

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-30248/
Summaries are generated and may contain mistakes; the official description above is the record.
