CVE-2026-84974 json
code16/sharp: Arbitrary class instantiation through the embed_key API parameter
published 2d ago modified 2d ago also GHSA-h24v-f482-8cwf
- cvss
- 5.4
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no EPSS score yet
- public exploits
- 0
- none known
Summary
### Impact
An authenticated attacker can instantiate any class in the PHP application by using the `embed_key` parameter across multiple API endpoints. The instantiation is performed by the Laravel container. As a result, the `__construct()` method of the class is called and all constructor dependencies are resolved. The attacker cannot specify parameter values and cannot call any arbitrary method.
### Patches
The problem has been patched in 9.23.0 and pre-release version 10.0.0-beta.4. An additional check was added to verify that `embed_key` is a class extending `SharpFormEditorEmbed` before any instantiation.
### Workarounds
No known workarounds.
Patch / fix
- packagist code16/sharp 9.23.0, 10.0.0-beta.4
- github.com/code16/sharp@dfafb44 commit
- github.com/code16/sharp#750 pull request
- github.com/code16/sharp/releases/tag/v9.23.0 release
Is CVE-2026-84974 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | code16/sharp | <9.23.0 >=10.0.0-beta.1, <10.0.0-beta.4 |
9.23.0 10.0.0-beta.4 |
Classification
- Weakness
-
- CWE-470 Use of Externally-Controlled Input to Select Classes or Code
References
-
github.com
/code16/sharp/pull/750
web
-
github.com
/code16/sharp/commit/dfafb44b11574e621bf0785f02c32b9866ab9923
web
-
github.com
/code16/sharp/security/advisories/GHSA-h24v-f482-8cwf
web
-
github.com
/code16/sharp
package
-
github.com
/code16/sharp/releases/tag/v9.23.0
web
-
github.com
/code16/sharp/tree/v10.0.0-beta.4
web
Sources
- GitHub Advisory GHSA-h24v-f482-8cwf
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.