# GHSA-G6F8-C3X9-JV7F: code16/sharp: Server-side request forgery through an unanchored autocomplete endpoint check

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2026-11-12
- Modified: 2026-11-12

## Tracked as

- [CVE-2026-84987](https://cve.now/CVE-2026-84987.md): Sharp server-side request forgery in autocomplete endpoint check

## Affected versions

- code16/sharp (Packagist): fixed in 9.23.0
- code16/sharp (Packagist): from 10.0.0-beta.1, fixed in 10.0.0-beta.4

## 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()`.

## References

- https://github.com/code16/sharp/security/advisories/GHSA-g6f8-c3x9-jv7f
- https://github.com/code16/sharp/pull/748
- https://github.com/code16/sharp/commit/339f89110f36d06eaad3f2b4bd048fa5424e5558
- https://github.com/code16/sharp
- https://github.com/code16/sharp/releases/tag/v9.23.0
- https://github.com/code16/sharp/tree/v10.0.0-beta.4

Page: https://cve.now/GHSA-G6F8-C3X9-JV7F
