CVE-2026-63193: October: Media Library Crop Handler Bypasses Upload Extension Allowlist
Medium CVSS 5.5
- OSV id
- GHSA-mqwx-84vv-mp26
- Also known as
- CVE-2026-63193
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| october/october Packagist |
<= 3.7.13 | after 3.7.13 |
| october/october Packagist |
>= 4.0.0, < 4.3.2 | 4.3.2 |
How to fix it
october/october (Packagist)
No fix yet. No fixed version of october/october has been released yet.
- Check the advisory and its references below for a workaround or a configuration change that turns off the affected feature.
- Limit exposure: don't pass untrusted input to the affected code path, and keep it off public endpoints if you can.
- Pin away from the affected versions if an older release is not affected, or consider replacing the package.
- Watch for the fix: a free AIssue account checks your lockfiles every day and emails you when a fixed version is released.
october/october (Packagist)
Upgrade october/october to 4.3.2 or later.
composer update october/october
# if composer.json blocks it: composer require "october/october:^4.3.2"
- If it is an indirect dependency, `composer update` the package that requires it, with dependencies.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
The Media Library upload handler validates the destination filename against an extension allowlist (default_extensions), rejecting types such as php, phtml, html, and htm. The image crop handler (MediaManager::onCropImage / cropImage) did not perform this check. The destination filename was taken from user input, the extension was extracted from it, and the staged bytes were written to the public media folder under that attacker-chosen extension. Combined with the fact that upload accepts any file contents under an allowlisted extension (a PHP payload disguised as .jpg), and that the zero-dimension crop branch performs a byte-for-byte File::copy rather than re-encoding the pixels, an authenticated backend user with the media.library.create permission could write a file with arbitrary extension and arbitrary contents into the public media folder.
Scope of impact depends on web server configuration. On a default October CMS install (using the shipped Apache .htaccess or nginx.conf), PHP execution from the media folder is blocked, so the realistic outcome is stored XSS via .html or .svg files served from the application origin. On a server that is configured to execute PHP inside the media directory (a non-default but real-world misconfiguration), the same bug becomes remote code execution.
Impact
- Bypass of the Media Library extension allowlist that the upload path enforces
- Stored XSS on default installs: attacker can write
.htmlor.svgfiles served from the application origin, executing script in the browser of any backend user or visitor who opens the file - SVG sanitizer bypass: the
Html::cleanVectorstep only runs on the upload path, so uploading malicious SVG content as a.jpgand then cropping it to.svgskips the sanitizer entirely - Remote code execution on deployments that execute PHP inside the media folder (non-default)
- Requires authenticated backend access with the
media.library.createpermission
Patches
The vulnerability has been patched in v3.7.18 and v4.3.3. The crop handler now applies the same extension allowlist check as the upload handler before staging the output file. As defense in depth, the central MediaLibrary::put and MediaLibrary::putFile write methods now validate the destination extension as well, so any future write path that goes through the library inherits the check. All users are encouraged to upgrade to the latest patched version.
Workarounds
If upgrading immediately is not possible:
- Restrict the
media.library.createpermission to fully trusted backend users only - Ensure the web server cannot execute PHP from the media storage directory (the shipped
.htaccessandnginx.confalready enforce this)
References
- Reported by nova-aryan
References
- GHSA-mqwx-84vv-mp26 on OSV.dev
- Web: https://github.com/octobercms/october/security/advisories/GHSA-mqwx-84vv-mp26
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-63193
- Web: https://github.com/octobercms/october/commit/118c3d08559e811c1bf69db7c5ed82a22bcf0bbc
- Package: https://github.com/octobercms/october
- Web: https://octobercms.com/changelog?json=3
- Web: https://octobercms.com/changelog?json=4
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.