GHSA-hwmc-r6mf-jh83: Spatie/schema org Cross-Site Scripting Vulnerability
LOWGHSA-hwmc-r6mf-jh83 is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Spatie/schema org libraries in the Packagist ecosystem. The issue involves schema.org has cross-site scripting (xss) via script break-out in toscript() output. Remediation is available by upgrading affected packages to version 3.23.2, 4.0.2.
GHSA-hwmc-r6mf-jh83 at a Glance
How to Fix GHSA-hwmc-r6mf-jh83
To remediate this vulnerability, upgrade all affected Spatie/schema org dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade spatie/schema-org to 3.23.2
Upgrade spatie/schema-org to 4.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for spatie/schema-org
How to Check if You Are Affected
To determine whether your application is affected by GHSA-hwmc-r6mf-jh83, inspect your project dependencies for Spatie/schema org:
inspect dependencies for spatie/schema-org
Analyze the terminal output to locate any version of Spatie/schema org in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.23.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Spatie/schema org, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-hwmc-r6mf-jh83 Affected Spatie/schema org Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
spatie/schema-org
|
Packagist |
≥ 3.23.1
< 3.23.2
|
3.23.2
|
|
spatie/schema-org
|
Packagist |
≥ 4.0.0
< 4.0.2
|
4.0.2
|
References
Frequently Asked Questions
What is GHSA-hwmc-r6mf-jh83?
Which Spatie/schema org versions are affected?
What version fixes GHSA-hwmc-r6mf-jh83?
Is spatie/schema-org affected?
What CWE is associated with GHSA-hwmc-r6mf-jh83?
How can I check Packagist dependencies for GHSA-hwmc-r6mf-jh83?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hwmc-r6mf-jh83",
"modified" : "2026-07-01T18:33:02Z",
"published" : "2026-07-01T18:32:31Z",
"aliases" : [ ],
"summary" : "Schema.org has cross-site scripting (XSS) via script break-out in toScript() output",
"details" : "Schema.org has a cross-site scripting (XSS) vulnerability via script break-out in toScript() output.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "spatie/schema-org"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.23.1"
}, {
"fixed" : "3.23.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "spatie/schema-org"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/spatie/schema-org/pull/242"
}, {
"type" : "WEB",
"url" : "https://github.com/spatie/schema-org/commit/be389b4759214c11cc1364a16e34a929c5af5a88"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/spatie/schema-org/2026-04-20.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spatie/schema-org"
}, {
"type" : "WEB",
"url" : "https://github.com/spatie/schema-org/releases/tag/4.0.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-01T18:32:31Z",
"nvd_published_at" : null
}
}