CVE-2026-84987 is a medium-severity (CVSS 5.4) vulnerability in code16/sharp. A fix is available for code16/sharp — see the affected versions and patch details below.
code16/sharp: Server-side request forgery through an unanchored autocomplete endpoint check
Real-World Exposure
code16/sharp🐘code16/sharpReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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().
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | code16/sharp | all versions | 9.23.0composer require code16/sharp:^9.23.0 |
| 🐘Packagist | code16/sharp | ≥ 10.0.0-beta.1&&< 10.0.0-beta.4 | 10.0.0-beta.4composer require code16/sharp:^10.0.0-beta.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for code16/sharp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update code16/sharp to 9.23.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-84987 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2026-84987 in your dependencies?
Find it across Packagist, including transitive dependencies.