Server-side Request Forgery (SSRF) Affecting code16/sharp package, versions >=9.0.0-alpha.1, <9.23.0>=10.0.0-beta.1, <10.0.0-beta.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.24% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-CODE16SHARP-22743311
  • published23 Nov 2026
  • disclosed17 Nov 2026
  • creditAvinash Jangir

Introduced: 17 Nov 2026

NewCVE-2026-84987  (opens in a new tab)
CWE-625  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade code16/sharp to version 9.23.0, 10.0.0-beta.4 or higher.

Overview

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) in the checkEndpoint method of the ApiFormAutocompleteController class, which validates the caller-supplied autocomplete endpoint with an unanchored regular expression, so the endpoint configured on the field need only appear as a substring of the requested value. The controller then issues an in-app subrequest to the supplied endpoint, so an authenticated user can embed the configured endpoint as a substring of a different path and have Sharp fetch another internal route on their behalf. This affects forms that use a SharpFormAutocompleteRemoteField configured with setRemoteEndpoint().

Workaround

This vulnerability can be avoided without upgrading by configuring the field with SharpFormAutocompleteRemoteField::setRemoteCallback() instead of setRemoteEndpoint(), which does not route through the vulnerable endpoint check.

CVSS Base Scores

version 4.0
version 3.1