GHSA-p9fg-j6ww-953m FOSRestBundle issue with broken validation of JSONP callbacks

Not scored Published

Improper validation of JSONP callbacks in FOSRestBundle allows attackers to execute arbitrary JavaScript in victim browsers.

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-p9fg-j6ww-953m?

GHSA-p9fg-j6ww-953m is a cross-site scripting vulnerability in friendsofsymfony/rest-bundle, published on 15 May 2024. 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

Starting with FOSRestBundle 1.2 we switched to using willdurand/jsonp-callback-validator for validation of JSONP callbacks. However the change was implemented incorrectly validating the callback query param name, rather than its value. Anyone using the JSONP handler (which is off by default) together with FOSRestBundle 1.2.0 or 1.2.1 should update to FOSRestBundle 1.2.2.

Which versions are affected by GHSA-p9fg-j6ww-953m?

2 open source packages ship an affected version, including friendsofsymfony/rest-bundle.

PackageAffectedFixed in
friendsofsymfony/rest-bundle PackagistFrom 1.2.01.2.2
friendsofsymfony/rest-bundle PackagistFrom 1.2.01.2.2

How do I fix GHSA-p9fg-j6ww-953m?

Upgrade friendsofsymfony/rest-bundle to 1.2.2 or later.

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-p9fg-j6ww-953m being exploited?

There is no known exploitation of GHSA-p9fg-j6ww-953m in the wild and no public exploit code.

Sources

Is GHSA-p9fg-j6ww-953m in your software?

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

Check your SBOMs for free