# CVE-2024-51991: October CMS Allows Unprotected SVG Rename in Media Manager

> Authenticated administrators can bypass SVG sanitization by renaming files, potentially leading to code execution or security bypass in October CMS.

- **Severity:** Low 1.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 5 May 2025
- **Updated:** 5 May 2025
- **Also known as:** GHSA-96hh-8hx5-cpw7

## What is CVE-2024-51991?

CVE-2024-51991 is a low-severity vulnerability in Octobercms October, published on 5 May 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

October is a Content Management System (CMS) and web platform. A vulnerability in versions prior to 3.7.5 affects authenticated administrators with sites that have the `media.clean_vectors` configuration enabled. This configuration will sanitize SVG files uploaded using the media manager. This vulnerability allows an authenticated user to bypass this protection by uploading it with a permitted extension (for example, .jpg or .png) and later modifying it to the .svg extension. This vulnerability assumes a trusted user will attack another trusted user and cannot be actively exploited without access to the administration panel and interaction from the other user. This issue has been patched in v3.7.5.

Weakness: CWE-434 (Unrestricted Upload of File with Dangerous Type)

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

4 open source packages ship an affected version, including october/october and october/system. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `october/october` | Packagist | All versions | 3.7.5 |
| `october/october` | Packagist | All versions | 3.7.5 |
| `october/system` | Packagist | All versions | 3.7.5 |
| `october/system` | Packagist | All versions | 3.7.5 |

Products: Octobercms October.

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

Upgrade october/october to 3.7.5 or later.

## Is CVE-2024-51991 being exploited?

There is no known exploitation of CVE-2024-51991 in the wild and no public exploit code.

## Other vulnerabilities in Octobercms October

- [CVE-2021-32648](https://insights.sbomify.com/CVE-2021-32648/): October CMS Improper Authentication (high 8.2, exploited in the wild)
- [CVE-2021-3311](https://insights.sbomify.com/CVE-2021-3311/): October CMS Session ID not invalidated after logout (critical 9.8)
- [CVE-2017-1000194](https://insights.sbomify.com/CVE-2017-1000194/): October CMS File Upload Vulnerability (critical 9.8)
- [CVE-2017-1000196](https://insights.sbomify.com/CVE-2017-1000196/): Code injection in n/a (critical 9.8)
- [CVE-2017-1000197](https://insights.sbomify.com/CVE-2017-1000197/): Path traversal in n/a (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-51991 is a low-severity vulnerability in Octobercms October, published on 5 May 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-51991 in the wild and no public exploit code.

Affected packages and fixed versions:
- october/october (Packagist): affected all versions; fixed in 3.7.5
- october/october (Packagist): affected all versions; fixed in 3.7.5
- october/system (Packagist): affected all versions; fixed in 3.7.5
- october/system (Packagist): affected all versions; fixed in 3.7.5

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-51991/ (Markdown: https://insights.sbomify.com/CVE-2024-51991/index.md)
```

## Sources

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

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