{"answers":{"affected":"4 open source packages ship an affected version, including org.geoserver:gs-main and org.geoserver:gs-ows. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-23640 in the wild and no public exploit code.","fix":"Upgrade org.geoserver:gs-main to 2.23.3 or later.","what":"CVE-2024-23640 is a medium-severity cross-site scripting vulnerability in geoserver, published on 20 Mar 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-23640 and fix it if it is affected.\n\nWhat it is: CVE-2024-23640 is a medium-severity cross-site scripting vulnerability in geoserver, published on 20 Mar 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-23640 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.geoserver:gs-main (Maven): affected all versions; fixed in 2.23.3\n- org.geoserver:gs-main (Maven): affected all versions; fixed in 2.23.3\n- org.geoserver:gs-ows (Maven): affected all versions; fixed in 2.23.3\n- org.geoserver:gs-ows (Maven): affected all versions; fixed in 2.23.3\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/CVE-2024-23640/ (Markdown: https://insights.sbomify.com/CVE-2024-23640/index.md)","id":"CVE-2024-23640","markdown":"https://insights.sbomify.com/CVE-2024-23640/index.md","name":"CVE-2024-23640","record":{"aliases":["GHSA-9rfr-pf2x-g4xf"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"GeoServer","requires_auth":"high_privilege","summary":"An authenticated administrator can inject JavaScript into GeoServer style resources, leading to script execution in other users' browsers.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"geoserver","vendor":"geoserver"}],"cvss":{"score":4.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. A stored cross-site scripting (XSS) vulnerability exists in versions prior to 2.23.3 and 2.24.0 that enables an authenticated administrator with workspace-level privileges to store a JavaScript payload in uploaded style/legend resources or in a specially crafted datastore file that will execute in the context of another user's browser when viewed in the Style Publisher. Access to the Style Publisher is available to all users although data security may limit users' ability to trigger the XSS. Versions 2.23.3 and 2.24.0 contain a fix for this issue.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"GeoServer Stored Cross-Site Scripting (XSS) vulnerability in Style Publisher","id":"CVE-2024-23640","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":4,"n_references":5,"next":{"headline":"Sending a GET or HEAD request with a body crashes SvelteKit","id":"CVE-2024-23641"},"packages":[{"ecosystem":"Maven","fixed":["2.23.3"],"introduced":["0"],"last_affected":[],"package":"org.geoserver:gs-main","purl":null,"source":"GHSA-9rfr-pf2x-g4xf"},{"ecosystem":"Maven","fixed":["2.23.3"],"introduced":["0"],"last_affected":[],"package":"org.geoserver:gs-main","purl":"pkg:maven/org.geoserver/gs-main","source":"GHSA-9rfr-pf2x-g4xf"},{"ecosystem":"Maven","fixed":["2.23.3"],"introduced":["0"],"last_affected":[],"package":"org.geoserver:gs-ows","purl":null,"source":"GHSA-9rfr-pf2x-g4xf"},{"ecosystem":"Maven","fixed":["2.23.3"],"introduced":["0"],"last_affected":[],"package":"org.geoserver:gs-ows","purl":"pkg:maven/org.geoserver/gs-ows","source":"GHSA-9rfr-pf2x-g4xf"}],"prev":{"headline":"micronaut-core management endpoints vulnerable to drive-by localhost attack","id":"CVE-2024-23639"},"products":["geoserver"],"published":"2024-03-20","related":[{"cvss_score":9.8,"headline":"OSGeo GeoServer GeoTools Eval Injection","id":"CVE-2024-36401","kev_date_added":"2024-07-15","published":"2024-07-01"},{"cvss_score":8.2,"headline":"OSGeo GeoServer Improper Restriction of XML External Entity Reference","id":"CVE-2025-58360","kev_date_added":"2025-12-11","published":"2025-11-25"},{"cvss_score":9.8,"headline":"GeoServer RCE due to improper control of generation of code in jai-ext`Jiffle` map algebra language","id":"CVE-2023-35042","kev_date_added":null,"published":"2023-06-12"},{"cvss_score":7.5,"headline":"Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat","id":"CVE-2024-24749","kev_date_added":null,"published":"2024-07-01"},{"cvss_score":7.2,"headline":"GeoServer log file path traversal vulnerability","id":"CVE-2023-41877","kev_date_added":null,"published":"2024-03-20"},{"cvss_score":7.2,"headline":"GeoServer arbitrary file upload vulnerability in REST Coverage Store API","id":"CVE-2023-51444","kev_date_added":null,"published":"2024-03-20"},{"cvss_score":6.1,"headline":"GeoServer Reflected Cross-Site Scripting (XSS) vulnerability in WMS GetFeatureInfo HTML format","id":"CVE-2025-21621","kev_date_added":null,"published":"2025-11-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-01","vendors":["geoserver"]},"summary":"An authenticated administrator can inject JavaScript into GeoServer style resources, leading to script execution in other users' browsers.","url":"https://insights.sbomify.com/CVE-2024-23640/"}