{"answers":{"affected":"2 open source packages ship an affected version, including friendsofsymfony/rest-bundle.","exploited":"There is no known exploitation of GHSA-p9fg-j6ww-953m in the wild and no public exploit code.","fix":"Upgrade friendsofsymfony/rest-bundle to 1.2.2 or later.","what":"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."},"fix_prompt":"Check this codebase for GHSA-p9fg-j6ww-953m and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of GHSA-p9fg-j6ww-953m in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- friendsofsymfony/rest-bundle (Packagist): affected from 1.2.0; fixed in 1.2.2\n- friendsofsymfony/rest-bundle (Packagist): affected from 1.2.0; fixed in 1.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-p9fg-j6ww-953m/ (Markdown: https://insights.sbomify.com/GHSA-p9fg-j6ww-953m/index.md)","id":"GHSA-p9fg-j6ww-953m","markdown":"https://insights.sbomify.com/GHSA-p9fg-j6ww-953m/index.md","name":"GHSA-p9fg-j6ww-953m","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Symfony REST Bundle","requires_auth":"none","summary":"Improper validation of JSONP callbacks in FOSRestBundle allows attackers to execute arbitrary JavaScript in victim browsers.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Starting with FOSRestBundle 1.2 we [switched](https://github.com/FriendsOfSymfony/FOSRestBundle/pull/642/files#diff-431bc57ca9ca16332c0cff43ad45263cR37) to using [willdurand/jsonp-callback-validator](https://github.com/willdurand/JsonpCallbackValidator) for validation of JSONP callbacks. However [the change was implemented](https://github.com/FriendsOfSymfony/FOSRestBundle/pull/665) 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](https://github.com/FriendsOfSymfony/FOSRestBundle/releases/tag/1.2.2).","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"FOSRestBundle issue with broken validation of JSONP callbacks","id":"GHSA-p9fg-j6ww-953m","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["1.2.2"],"introduced":["1.2.0"],"last_affected":[],"package":"friendsofsymfony/rest-bundle","purl":null,"source":"GHSA-p9fg-j6ww-953m"},{"ecosystem":"Packagist","fixed":["1.2.2"],"introduced":["1.2.0"],"last_affected":[],"package":"friendsofsymfony/rest-bundle","purl":"pkg:composer/friendsofsymfony/rest-bundle","source":"GHSA-p9fg-j6ww-953m"}],"products":null,"published":"2024-05-15","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Improper validation of JSONP callbacks in FOSRestBundle allows attackers to execute arbitrary JavaScript in victim browsers.","url":"https://insights.sbomify.com/GHSA-p9fg-j6ww-953m/"}