{"answers":{"affected":"4 open source packages ship an affected version, including org.springframework.data:spring-data-mongodb. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-22980 in the wild and no public exploit code.","fix":"Upgrade org.springframework.data:spring-data-mongodb to a fixed version for your release line: 3.3.5 or 3.4.1.","what":"CVE-2022-22980 is a critical code injection vulnerability in Spring Data MongoDB, published on 22 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-22980 and fix it if it is affected.\n\nWhat it is: CVE-2022-22980 is a critical code injection vulnerability in Spring Data MongoDB, published on 22 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-22980 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.springframework.data:spring-data-mongodb (Maven): affected all versions; fixed in 3.3.5\n- org.springframework.data:spring-data-mongodb (Maven): affected all versions; fixed in 3.3.5\n- org.springframework.data:spring-data-mongodb (Maven): affected from 3.4.0; fixed in 3.4.1\n- org.springframework.data:spring-data-mongodb (Maven): affected from 3.4.0; fixed in 3.4.1\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-2022-22980/ (Markdown: https://insights.sbomify.com/CVE-2022-22980/index.md)","id":"CVE-2022-22980","markdown":"https://insights.sbomify.com/CVE-2022-22980/index.md","name":"CVE-2022-22980","record":{"aliases":["GHSA-w24x-87mr-4r23"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Spring Data MongoDB","requires_auth":"none","summary":"Attackers can execute arbitrary code via SpEL injection in Spring Data MongoDB query methods if input is not sanitized.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"vmware","cpe":[{"product":"spring_data_mongodb","vendor":"vmware"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-917","name":"Improper Neutralization of Special Elements used in an Expression Language Statement"}],"description":"A Spring Data MongoDB application is vulnerable to SpEL Injection when using @Query or @Aggregation-annotated query methods with SpEL expressions that contain query parameter placeholders for value binding if the input is not sanitized.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2022-06-21","github_poc":7,"max_poc_stars":32,"metasploit":0,"nuclei":0,"refs":[{"date":"2022-06-21T11:39:13Z","kind":"github_poc","ref":"https://github.com/trganda/CVE-2022-22980","stars":32,"title":"Poc of CVE-2022-22980"},{"date":"2022-06-21T12:02:00Z","kind":"github_poc","ref":"https://github.com/kuron3k0/Spring-Data-Mongodb-Example","stars":14,"title":"CVE-2022-22980环境"},{"date":"2022-06-22T07:39:42Z","kind":"github_poc","ref":"https://github.com/li8u99/Spring-Data-Mongodb-Demo","stars":11,"title":"CVE-2022-22980环境"},{"date":"2022-06-22T07:51:22Z","kind":"github_poc","ref":"https://github.com/jweny/cve-2022-22980","stars":10,"title":"CVE-2022-22980 exp \u0026\u0026 靶场"},{"date":"2022-07-13T14:07:26Z","kind":"github_poc","ref":"https://github.com/Vulnmachines/Spring_cve-2022-22980","stars":7,"title":"spring data mongodb remote code execution | cve-2022-22980 poc"},{"date":"2022-06-28T21:42:35Z","kind":"github_poc","ref":"https://github.com/murataydemir/CVE-2022-22980","stars":5,"title":"[CVE-2022-22980] Spring Data MongoDB SpEL Expression Injection"},{"date":"2026-02-18T10:21:33Z","kind":"github_poc","ref":"https://github.com/Eliasdekiniweek/CVE-2022-22980","stars":1,"title":"Exploitation de CVE-2022-22980"}],"tier":"poc_unverified"},"has_fix":true,"headline":"SpEL Injection in Spring Data MongoDB","id":"CVE-2022-22980","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"code_injection","year":"2022"},"n_packages":4,"n_references":1,"next":{"headline":"Server-side request forgery in VMware vCenter Server","id":"CVE-2022-22982"},"packages":[{"ecosystem":"Maven","fixed":["3.3.5"],"introduced":["0"],"last_affected":[],"package":"org.springframework.data:spring-data-mongodb","purl":null,"source":"GHSA-w24x-87mr-4r23"},{"ecosystem":"Maven","fixed":["3.3.5"],"introduced":["0"],"last_affected":[],"package":"org.springframework.data:spring-data-mongodb","purl":"pkg:maven/org.springframework.data/spring-data-mongodb","source":"GHSA-w24x-87mr-4r23"},{"ecosystem":"Maven","fixed":["3.4.1"],"introduced":["3.4.0"],"last_affected":[],"package":"org.springframework.data:spring-data-mongodb","purl":null,"source":"GHSA-w24x-87mr-4r23"},{"ecosystem":"Maven","fixed":["3.4.1"],"introduced":["3.4.0"],"last_affected":[],"package":"org.springframework.data:spring-data-mongodb","purl":"pkg:maven/org.springframework.data/spring-data-mongodb","source":"GHSA-w24x-87mr-4r23"}],"prev":{"headline":"Denial of Service in Spring Cloud Function","id":"CVE-2022-22979"},"products":["Spring Data MongoDB"],"published":"2022-06-22","related":[{"cvss_score":8.1,"headline":"Spring Data MongoDB - SpEL Expression Injection via Annotated Query Parameter Binding","id":"CVE-2026-41717","kev_date_added":null,"published":"2026-06-09"},{"cvss_score":5.9,"headline":"Spring Data MongoDB Bind Parameter Literal Quoting Breakout","id":"CVE-2026-41696","kev_date_added":null,"published":"2026-06-09"}],"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code via SpEL injection in Spring Data MongoDB query methods if input is not sanitized.","url":"https://insights.sbomify.com/CVE-2022-22980/"}