{"id":"GHSA-574f-3g2m-x479","summary":"Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks","details":"The GOST 28147-2015 CTR mode implementation (`G3413CTRBlockCipher`) in the Legion of the Bouncy Castle BC-JAVA `bcprov` core module only increments the final byte of the counter, so the counter wraps after 255 blocks and the keystream is reused. Reusing CTR keystream allows an attacker who can observe two ciphertexts produced with the same key/IV to recover the XOR of the plaintexts, breaking confidentiality. Affects BC-JAVA from 1.59 before 1.84 (with backported fixes in 1.80.2 and 1.81.1).","aliases":["CVE-2025-14813"],"modified":"2026-09-24T15:30:06.473586613Z","published":"2026-04-17T18:31:50Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2026-06-30T19:45:20Z","nvd_published_at":"2026-04-15T10:16:38Z","cwe_ids":["CWE-323","CWE-327"],"severity":"CRITICAL"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-14813"},{"type":"WEB","url":"https://github.com/bcgit/bc-java/commit/b42574345414e4b7c8051b16fa1fafe01c29871f"},{"type":"WEB","url":"https://github.com/bcgit/bc-java/commit/701686cb0184cd9ae103c801b3581fdf95c6d4f3"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:11720"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60248"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60249"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60250"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60251"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60252"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60254"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60256"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60259"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:66488"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2025-14813"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2458640"},{"type":"PACKAGE","url":"https://github.com/bcgit/bc-java"},{"type":"WEB","url":"https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902025%E2%80%9014813"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-14813.json"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:11721"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:13631"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:14272"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:14276"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:17668"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:18054"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:18055"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:18059"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:21772"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:24977"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:53644"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:53645"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:53646"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:53806"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60239"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60246"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:60247"}],"affected":[{"package":{"name":"org.bouncycastle:bcprov-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk14"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.80.1"}]}],"versions":["1.59","1.60","1.61","1.62","1.63","1.64","1.65","1.67","1.68","1.69","1.70","1.71","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1","1.79","1.80"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk15to18"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.80.1"}]}],"versions":["1.63","1.64","1.65","1.66","1.67","1.68","1.69","1.70","1.71","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1","1.79","1.80"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"fixed":"1.80.2"}]}],"versions":["1.71","1.71.1","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1","1.79","1.80"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.80.1","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk14"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.80.1"}]}],"versions":["1.59","1.60","1.64","1.68","1.69","1.70","1.71","1.72","1.73","1.74","1.78","1.79","1.80"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk15to18"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.80.1"}]}],"versions":["1.64","1.68","1.69","1.70","1.71","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1","1.79"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.80.1"}]}],"versions":["1.71","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1","1.79"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-ext-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-ext-jdk14"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.78.1"}]}],"versions":["1.60","1.64","1.65","1.67","1.68","1.69","1.70","1.71","1.72","1.73","1.75","1.76","1.78","1.78.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-ext-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-ext-jdk15to18"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.78.1"}]}],"versions":["1.64","1.67","1.68","1.69","1.70","1.71","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-ext-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-ext-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.78.1"}]}],"versions":["1.71","1.72","1.73","1.74","1.75","1.76","1.77","1.78","1.78.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-ext-debug-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-ext-debug-jdk14"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.74"}]}],"versions":["1.60","1.68","1.69","1.70","1.71","1.72","1.73","1.74"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-ext-debug-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-ext-debug-jdk15to18"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.77"}]}],"versions":["1.68","1.69","1.70","1.71","1.72","1.73","1.74","1.75","1.76","1.77"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-ext-debug-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-ext-debug-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.59"},{"last_affected":"1.77"}]}],"versions":["1.71","1.72","1.73","1.74","1.75","1.76","1.77"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk14"},"versions":["1.81.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk15to18"},"versions":["1.81.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.81.0"},{"fixed":"1.81.1"}]}],"versions":["1.81","1.81.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk14"},"versions":["1.81.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk15to18"},"versions":["1.81.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk18on"},"versions":["1.81.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk14"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.82"},{"fixed":"1.84"}]}],"versions":["1.82","1.83"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.83","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk15to18"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.82"},{"fixed":"1.84"}]}],"versions":["1.82","1.83"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.83","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.82"},{"fixed":"1.84"}]}],"versions":["1.82","1.83"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.83","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk14","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk14"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.82"},{"fixed":"1.84"}]}],"versions":["1.82","1.83"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json","last_known_affected_version_range":"\u003c= 1.83"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk15to18","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk15to18"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.82"},{"fixed":"1.84"}]}],"versions":["1.82","1.83"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.83","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk18on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk18on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.82"},{"fixed":"1.84"}]}],"versions":["1.82","1.83"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.83","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-debug-jdk15on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-debug-jdk15on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.7.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}},{"package":{"name":"org.bouncycastle:bcprov-jdk15on","ecosystem":"Maven","purl":"pkg:maven/org.bouncycastle/bcprov-jdk15on"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.7.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-574f-3g2m-x479/GHSA-574f-3g2m-x479.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N/RE:M/U:Red"}]}