PatchClock

PHP security digest · 12 Nov 2026

code16/sharp: Server-side request forgery through an unanchored autocomplete endpoint check

Medium CVE-2026-84987

Package
code16/sharp
Fixed in
9.23.0, 10.0.0-beta.4
Published
Thu 12 Nov 2026, 18:21 LisbonUpdated Tue 17 Nov 2026, 00:45 Lisbon
Installs on Packagist
71K

In plain words

An authenticated attacker can make the Autocomplete API request another server-side route by supplying a value that contains the configured endpoint as a substring. The endpoint check accepts this partial match rather than requiring an exact match. This is fixed in 9.23.0 and 10.0.0-beta.4.

Affected versions

PackageAffectedFixed in
code16/sharp< 9.23.09.23.0
code16/sharp>= 10.0.0-beta.1, < 10.0.0-beta.410.0.0-beta.4

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.

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

Am I affected?

Check composer.lock for code16/sharp: affected versions are below 9.23.0, or from 10.0.0-beta.1 up to but not including 10.0.0-beta.4. If affected, check whether your autocomplete fields use SharpFormAutocompleteRemoteField::setRemoteEndpoint(). The attack requires an authenticated user to call the Autocomplete API.

Did you install code16/sharp, or did a dependency?

Composer says why a package is in your project:

composer why code16/sharp

If the output names your own project, you required code16/sharp directly and the update is yours to make. If it names another package, code16/sharp 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 code16/sharp 9.23.0

Every line it prints is a constraint that blocks 9.23.0. Update the package it names, or raise your own constraint, and run it again until it prints nothing. If you stay on an older branch, ask about its fix instead: 10.0.0-beta.4.

What to do

Check which version you have, then update to a fixed release for your branch (9.23.0, 10.0.0-beta.4):

composer show code16/sharp | grep versions
composer update code16/sharp

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

Use SharpFormAutocompleteRemoteField::setRemoteCallback() instead of SharpFormAutocompleteRemoteField::setRemoteEndpoint().

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 code16/sharp 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 code16/sharp, and why, is the evidence you will want later.

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

code16/sharp's record

This is one of 4 advisories for code16/sharp in the digest, the first published on 25 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 code16/sharp

  • CVE-2026-84974 · 12 Nov 2026 · Medium · fixed in 9.23.0, 10.0.0-beta.4 code16/sharp: Arbitrary class instantiation through the embed_key API parameter
  • CVE-2026-61823 · 25 Sep 2026 · High · fixed in 9.22.5 code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute
  • CVE-2026-61825 · 25 Sep 2026 · High · fixed in 9.22.5 code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

The advisory's description

Impact

An authenticated attacker can call the Autocomplete API with the configured endpoint as a substring to request another server-side route.

Patches

The problem has been patched in 9.23.0 and pre-release version 10.0.0-beta.4. The regex verifying the endpoint has been anchored to forbid substring injection.

Workarounds

Use SharpFormAutocompleteRemoteField::setRemoteCallback() instead of SharpFormAutocompleteRemoteField::setRemoteEndpoint().

Weakness: CWE-625 Permissive Regular Expression; CWE-918 Server-Side Request Forgery. Reported by The4v1.

CWE-918. Server-side request forgery: the server fetches a URL the attacker chooses, which can reach internal services and cloud metadata.

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.