Intel

AIKIDO-2026-10523

spatie/schema-org is vulnerable to Cross-site Scripting (XSS)

Cross-site Scripting (XSS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Apr 23, 2026

50

Medium Risk

This Affects:

PHPspatie/schema-org
3.23.1 - 4.0.1
Fixed in 4.0.2
Are you affected? Scan for Free

TL;DR

Improper neutralization of user-controlled data in toScript() output in spatie/schema-org allowed HTML script-tag breakout when attacker-supplied values were embedded in JSON-LD metadata. Because <script type="application/ld+json"> blocks were generated without escaping HTML tag delimiters, crafted input containing </script> sequences could inject executable JavaScript into the page. Successful exploitation could result in stored or reflected cross-site scripting.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

spatie/schema-org is vulnerable to Cross-site Scripting (XSS) in versions 3.23.1 - 4.0.1.

How to fix this

Upgrade the spatie/schema-org library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform