{"id":"CVE-2025-9340","published":"2025-08-22T09:39:47Z","modified":"2025-08-22T10:37:18Z","title":"native encrypt/decrypt operations in JCE may corrupt data if same byte array used for input and output.","vendor":"Legion of the Bouncy Castle Inc.","product":"Bouncy Castle for Java","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":0,"severity":"NONE","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0021,"percentile":0.11125,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902025%E2%80%909340","tags":[]}],"priority":{"score":2.2,"factors":[{"name":"EPSS percentile","points":2.23}]},"vendorSlug":"legion-of-the-bouncy-castle","affectedVersions":[{"vendor":"Legion of the Bouncy Castle Inc.","product":"Bouncy Castle for Java","versions":[">= BC-FJA 2.1.0, <= 2.1.0"]}],"workarounds":{"items":["This can be coded around by avoiding operations in place when dealing with aes-native encryption/decryption."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-08-22T10:37:04.005071Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.bouncycastle:bc-fips","vulnerableRanges":[">=2.1.0, <2.1.1"],"patched":["2.1.1"],"from":["GHSA-g6rx-6wfx-gj74"],"provenance":"source"}],"summary":{"text":"The flaw is an out-of-bounds write in the native encrypt/decrypt operations of the JCE provider's cipher code (org/bouncycastle/jcajce/provider/BaseCipher) in Bouncy Castle for Java's bc-fips API modules. An attacker with local access and low privileges, where the user is required to take an action, could potentially cause data corruption when the same byte array is used for both input and output.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:57Z"},"euvd":{"id":"EUVD-2025-25505","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-29857","published":"2024-05-09","fixed":"1.0.2.5","kev":false},{"cve":"CVE-2025-8885","published":"2025-08-12","fixed":"2.0.1","kev":false},{"cve":"CVE-2025-9092","published":"2025-08-16","fixed":"2.1.1","kev":false},{"cve":"CVE-2025-9340","published":"2025-08-22","fixed":"2.1.1","kev":false},{"cve":"CVE-2025-9341","published":"2025-08-22","fixed":"2.1.1","kev":false},{"cve":"CVE-2025-12194","published":"2025-10-24","fixed":"2.1.2","kev":false,"link":{"from":"CVE-2025-9340","to":"CVE-2025-12194","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.bouncycastle:bc-fips","fromFixed":"2.1.1","toFixed":"2.1.2","daysApart":63}]}},{"cve":"CVE-2026-13505","published":"2026-08-08","fixed":"2.1.3","kev":false}],"package":"Maven:org.bouncycastle:bc-fips"}}