GHSA-hwmc-r6mf-jh83 Schema.org has cross-site scripting (XSS) via script break-out in toScript() output

Not scored Published

An attacker can execute arbitrary scripts in a victim's browser via XSS in the Schema.org library's toScript() output.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-hwmc-r6mf-jh83?

GHSA-hwmc-r6mf-jh83 is a cross-site scripting vulnerability in spatie/schema-org, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Schema.org has a cross-site scripting (XSS) vulnerability via script break-out in toScript() output.

Which versions are affected by GHSA-hwmc-r6mf-jh83?

4 open source packages ship an affected version, including spatie/schema-org.

PackageAffectedFixed in
spatie/schema-org PackagistFrom 3.23.13.23.2
spatie/schema-org PackagistFrom 3.23.13.23.2
spatie/schema-org PackagistFrom 4.0.04.0.2
spatie/schema-org PackagistFrom 4.0.04.0.2

How do I fix GHSA-hwmc-r6mf-jh83?

Upgrade spatie/schema-org to a fixed version for your release line: 3.23.2 or 4.0.2.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is GHSA-hwmc-r6mf-jh83 being exploited?

There is no known exploitation of GHSA-hwmc-r6mf-jh83 in the wild and no public exploit code.

Sources

Is GHSA-hwmc-r6mf-jh83 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free