low1.3No CVE yet
GHSA-hwmc-r6mf-jh83
Schema.org has cross-site scripting (XSS) via script break-out in toScript() output
Impact
Schema.org has a cross-site scripting (XSS) vulnerability via script break-out in toScript() output.
An attacker can exploit this over the network, without logging in, but a user has to be involved, for example by viewing content.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| composer | spatie/schema-org | >= 3.23.1, < 3.23.2 | 3.23.2 |
| composer | spatie/schema-org | >= 4.0.0, < 4.0.2 | 4.0.2 |
Weakness classification
References
- GitHub advisory
- https://github.com/advisories/GHSA-hwmc-r6mf-jh83
- https://github.com/spatie/schema-org/pull/242
- https://github.com/spatie/schema-org/commit/be389b4759214c11cc1364a16e34a929c5af5a88
- https://github.com/FriendsOfPHP/security-advisories/blob/master/spatie/schema-org/2026-04-20.yaml
- https://github.com/spatie/schema-org/releases/tag/4.0.2