{"answers":{"affected":"2 open source packages ship an affected version, including org.bouncycastle:bc-fips.","exploited":"There is no known exploitation of CVE-2025-9340 in the wild and no public exploit code.","fix":"Upgrade org.bouncycastle:bc-fips to 2.1.1 or later.","what":"CVE-2025-9340 is a memory corruption vulnerability in Legion of the Bouncy Castle Inc. Bouncy Castle for Java, published on 22 Aug 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-9340 and fix it if it is affected.\n\nWhat it is: CVE-2025-9340 is a memory corruption vulnerability in Legion of the Bouncy Castle Inc. Bouncy Castle for Java, published on 22 Aug 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-9340 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.bouncycastle:bc-fips (Maven): affected from 2.1.0; fixed in 2.1.1\n- org.bouncycastle:bc-fips (Maven): affected from 2.1.0; fixed in 2.1.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-2025-9340/ (Markdown: https://insights.sbomify.com/CVE-2025-9340/index.md)","id":"CVE-2025-9340","markdown":"https://insights.sbomify.com/CVE-2025-9340/index.md","name":"CVE-2025-9340","record":{"aliases":["GHSA-g6rx-6wfx-gj74"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Java cryptography library","requires_auth":"low_privilege","summary":"Bouncy Castle for Java may corrupt data or crash when encrypting/decrypting using the same byte array for input and output.","user_interaction":"required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"bcorg","cpe":[],"cvss":{"score":0,"severity":"low","source":"cna","vector":"CVSS:4.0/AV:P/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N/S:N/R:U/RE:M/U:Green","version":"4.0"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"description":"Out-of-bounds Write vulnerability in Legion of the Bouncy Castle Inc. Bouncy Castle for Java bc-fips on All (API modules). This vulnerability is associated with program files org/bouncycastle/jcajce/provider/BaseCipher.\n\nThis issue affects Bouncy Castle for Java: from BC-FJA 2.1.0 through 2.1.0.","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":"native encrypt/decrypt operations in JCE may corrupt data if same byte array used for input and output.","id":"CVE-2025-9340","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"memory_corruption","year":"2025"},"n_packages":2,"n_references":1,"next":{"headline":"Garbage collection can delay for AES CBC Native support, resulting in heap exhaustion","id":"CVE-2025-9341"},"packages":[{"ecosystem":"Maven","fixed":["2.1.1"],"introduced":["2.1.0"],"last_affected":[],"package":"org.bouncycastle:bc-fips","purl":null,"source":"GHSA-g6rx-6wfx-gj74"},{"ecosystem":"Maven","fixed":["2.1.1"],"introduced":["2.1.0"],"last_affected":[],"package":"org.bouncycastle:bc-fips","purl":"pkg:maven/org.bouncycastle/bc-fips","source":"GHSA-g6rx-6wfx-gj74"}],"prev":{"headline":"SQL Injection in SIMPLE.ERP","id":"CVE-2025-9339"},"products":["Bouncy Castle for Java"],"published":"2025-08-22","related":[],"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":"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":"2025-08-22","vendors":["Legion of the Bouncy Castle Inc."]},"summary":"Bouncy Castle for Java may corrupt data or crash when encrypting/decrypting using the same byte array for input and output.","url":"https://insights.sbomify.com/CVE-2025-9340/"}