PatchClock

PHP security digest · 19 Nov 2026

October: Media Library Crop Handler Bypasses Upload Extension Allowlist

Medium CVE-2026-63193

Package
october/october
Fixed in
4.3.2
Published
Thu 19 Nov 2026, 20:46 LisbonUpdated Sun 29 Nov 2026, 00:45 Lisbon
Installs on Packagist
275K

In plain words

An authenticated backend user with media.library.create permission can bypass the Media Library’s extension allowlist through the image crop handler, writing files with arbitrary extensions and contents into the public media folder. On default installations, this can cause stored cross-site scripting when a backend user or visitor opens a malicious file. If the web server is configured to execute PHP in that folder, the flaw can also allow remote code execution.

Affected versions

PackageAffectedFixed in
october/october<= 3.7.13no fix yet
october/october>= 4.0.0, <= 4.3.14.3.2

How serious is it?

Medium is a CVSS score of 4.0 to 6.9: real impact, but the attacker needs something first, such as an account, a particular setting or a user who clicks a link. If your site meets that condition, treat it as High; if not, ship the fix in your next planned release.

october/october has 275K installs on Packagist, so the advisory reaches a modest number of projects, which does not make yours any safer.

Am I affected?

Look for october/october in composer.lock: the listed affected ranges are <= 3.7.13 and >= 4.0.0, <= 4.3.1. Check which backend users have media.library.create permission and whether your web server permits PHP execution in the media storage directory. The shipped Apache .htaccess and nginx.conf block PHP execution there, but do not prevent the stored XSS impact. Note that the advisory’s fix information conflicts: the structured data lists 4.3.2, while the description names 3.7.18 and 4.3.3 as patched.

Did you install october/october, or did a dependency?

Composer says why a package is in your project:

composer why october/october

If the output names your own project, you required october/october directly and the update is yours to make. If it names another package, october/october came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:

composer why-not october/october 4.3.2

Every line it prints is a constraint that blocks 4.3.2. Update the package it names, or raise your own constraint, and run it again until it prints nothing.

What to do

Check which version you have, then update to a fixed release for your branch (4.3.2):

composer show october/october | grep versions
composer update october/october

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

If you cannot update yet

Restrict media.library.create permission to fully trusted backend users only. Ensure the web server cannot execute PHP from the media storage directory; the shipped .htaccess and nginx.conf already enforce this.

Check the whole project at once

Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:

composer audit --locked

--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.

Under the Cyber Resilience Act

CRA Article 14 timeline: aware of exploitation at hour 0, early warning within 24 hours, notification within 72 hours, final report within 14 days after the fix.

No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.

Either way, if october/october ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated october/october, and why, is the evidence you will want later.

What goes in each Article 14 report · Does the CRA apply to your product?

october/october's record

This is one of 2 advisories for october/october in the digest, the first published on 14 September 2026. A package with several advisories is not worse than one with none, which often just means nobody looked; it does tell you to keep it on your update list and to run composer audit after each update.

Other advisories for october/october

  • CVE-2026-100909 · 14 Sep 2026 · Low · fixed in 4.3.5 October CMS: Incomplete Scheme Validation in Image Resizer

The advisory's description

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 .html or .svg files 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::cleanVector step only runs on the upload path, so uploading malicious SVG content as a .jpg and then cropping it to .svg skips 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.create permission

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.create permission to fully trusted backend users only
  • Ensure the web server cannot execute PHP from the media storage directory (the shipped .htaccess and nginx.conf already enforce this)

References

  • Reported by nova-aryan

Weakness: CWE-79 Improper Neutralization of Input During Web Page Generation; CWE-434 Unrestricted Upload of File with Dangerous Type. Reported by nova-aryan.

CWE-79. Cross-site scripting: text an attacker controls reaches a page as markup, so their script runs in another user's browser with that user's session.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.