In Bouncy Castle for Java before 1.85, CCM-family modes write plaintext to caller buffer before tag check. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).
{
"cwe_ids": [
"CWE-354"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58061.json",
"unresolved_ranges": [
{
"extracted_events": [
{
"introduced": "1.0.0"
},
{
"fixed": "1.0.2.7"
},
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.2"
},
{
"introduced": "2.1.0"
},
{
"fixed": "2.1.3"
}
],
"source": "AFFECTED_FIELD"
}
],
"cna_assigner": "bcorg"
}[
{
"source": "https://github.com/bcgit/bc-java/commit/08d675106bb663ddcc6ec0a4af6f6f62f512697b",
"target": {
"file": "core/src/main/java/org/bouncycastle/crypto/modes/KGCMBlockCipher.java",
"function": "doFinal"
},
"deprecated": false,
"digest": {
"function_hash": "196006457380830527097761483051434262675",
"length": 1764.0
},
"id": "CVE-2026-58061-003294d6",
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2026-58061-058a7bc9",
"signature_version": "v1",
"target": {
"file": "core/src/main/java/org/bouncycastle/crypto/modes/CCMBlockCipher.java"
},
"deprecated": false,
"source": "https://github.com/bcgit/bc-java/commit/cd4a5ab3ad619ff03c7767c1b8b19d5dea2970af",
"digest": {
"line_hashes": [
"330219421063663668875282814311426130362",
"190071687782965338480174111534821514382",
"219229446112680708010902157285142377248",
"121779507229593737398470740553856811851",
"70106108884041769415825831591628659890",
"297985411598609756731850991195965402448",
"263856452695657055958996380958314640092",
"285906683517015777155285687973960132474",
"56926160140901809370206990048421320302",
"192020694941943231181763246804859273732",
"142817554384531973996499143460402507975",
"138606489479653877596186861721048688954",
"57994644760409286742687379371346397339",
"176911806139037829167487027868098115875",
"68987442173904257877390658204776968939",
"284494236199350705241407753958717633231",
"315413603195079010533678748682782565247"
],
"threshold": 0.9
},
"signature_type": "Line"
},
{
"digest": {
"line_hashes": [
"163051986550516513765930535747943654294",
"293774713230383873545501869942324092793",
"294185186270660855083302248867748073942",
"323833894220166513078117887089960547881"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "core/src/test/java/org/bouncycastle/crypto/test/CCMTest.java"
},
"deprecated": false,
"id": "CVE-2026-58061-2006d4a4",
"source": "https://github.com/bcgit/bc-java/commit/cd4a5ab3ad619ff03c7767c1b8b19d5dea2970af",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "core/src/main/java/org/bouncycastle/crypto/modes/KCCMBlockCipher.java",
"function": "processPacket"
},
"deprecated": false,
"digest": {
"function_hash": "144583207526486135335151715894540746596",
"length": 1785.0
},
"source": "https://github.com/bcgit/bc-java/commit/08d675106bb663ddcc6ec0a4af6f6f62f512697b",
"id": "CVE-2026-58061-47259f62",
"signature_type": "Function"
},
{
"target": {
"file": "core/src/main/java/org/bouncycastle/crypto/modes/CCMBlockCipher.java",
"function": "processPacket"
},
"deprecated": false,
"digest": {
"function_hash": "53927898972304778036262062774293304638",
"length": 2433.0
},
"signature_version": "v1",
"id": "CVE-2026-58061-530680ca",
"source": "https://github.com/bcgit/bc-java/commit/cd4a5ab3ad619ff03c7767c1b8b19d5dea2970af",
"signature_type": "Function"
},
{
"id": "CVE-2026-58061-68c58669",
"signature_version": "v1",
"target": {
"file": "core/src/main/java/org/bouncycastle/crypto/modes/KGCMBlockCipher.java"
},
"deprecated": false,
"source": "https://github.com/bcgit/bc-java/commit/08d675106bb663ddcc6ec0a4af6f6f62f512697b",
"digest": {
"line_hashes": [
"86111625580314552368699856623029397288",
"17516812347890513301834165663732771395",
"36317088889255224805420076200139308143",
"174482820431831324070632016108906113977",
"191496305698149317422403940429088520206",
"127969405845504387292200973694481551547",
"23297695452934745867870459170241249251",
"168346950546996696236501619437620855382",
"288739491291178302428149889323347265320",
"124972074357020637188286225826859674553",
"127356784700789364307977895354161371917",
"206613744037483797585432064343850060276",
"1094925937452442194049567722127844399",
"253300987702659698231395652963883927522",
"57338314171613277709125651421675686139",
"9804697952748573194146524551369424972",
"221460891803101522281959382473396353211",
"172537503964590427699332347679951250890",
"109104801145729569483687163395854128870",
"93157007168531204039897476185348111803",
"274521827946923217056396321343165731747",
"142907345388055551285812892829899109427",
"259782424887987435560827656469235432094",
"255414876164053946587505489287470881091",
"120454236176820717421191355771808270813",
"289109262812655128462321259435752647946",
"297498362477291085797904707294581878290",
"250287549685543224978674476579085900387"
],
"threshold": 0.9
},
"signature_type": "Line"
},
{
"id": "CVE-2026-58061-7d2c3ded",
"signature_version": "v1",
"target": {
"file": "core/src/test/java/org/bouncycastle/crypto/test/CCMTest.java",
"function": "performTest"
},
"deprecated": false,
"source": "https://github.com/bcgit/bc-java/commit/cd4a5ab3ad619ff03c7767c1b8b19d5dea2970af",
"digest": {
"function_hash": "188974738463051608721373479624747041970",
"length": 3637.0
},
"signature_type": "Function"
},
{
"target": {
"file": "core/src/test/java/org/bouncycastle/crypto/test/DSTU7624Test.java"
},
"deprecated": false,
"digest": {
"line_hashes": [
"279855097385877885646094073170190057324",
"177520114712822213777308060791605495488",
"260768041947056117463773051945507492137",
"321590319580950891692159574715951508900"
],
"threshold": 0.9
},
"signature_version": "v1",
"id": "CVE-2026-58061-89d89dc4",
"source": "https://github.com/bcgit/bc-java/commit/08d675106bb663ddcc6ec0a4af6f6f62f512697b",
"signature_type": "Line"
},
{
"id": "CVE-2026-58061-f1afd05f",
"signature_version": "v1",
"target": {
"file": "core/src/main/java/org/bouncycastle/crypto/modes/KCCMBlockCipher.java"
},
"deprecated": false,
"source": "https://github.com/bcgit/bc-java/commit/08d675106bb663ddcc6ec0a4af6f6f62f512697b",
"digest": {
"line_hashes": [
"216603709522390097734774195086754400407",
"86977434040430386820246107013756643576",
"304403555267441228722892470934119406370",
"81540282818698606430470617692880850035",
"26594299615675034776957261279253396313",
"321844796495865593203685342933211514674",
"239505877819144048901149711009311085216",
"121431298591764881784514425970995912070",
"256655261669189703476621133254293564250",
"248547696455431879727005259853439950734",
"223277758949238278735458769827836415636",
"194652695220930788390733184827906202519",
"336679845893580009434770601908344522500",
"160602167312485379469196180769260676021",
"263123442369445213087732807463483946558",
"62456452852014528693957119348303238549",
"35236568625647318268343937693135977015",
"144530166323761540301398939032692547976",
"97632724180559753043774035338583180290",
"200025657507982855932065673987107583921",
"264360851010576365927654993016527623922",
"168988375742479373572490686956661698083",
"250307695523601220859955786879500930473",
"328270423059312955640188637804238072931",
"327580807622298640645429822227424437204",
"197962665799030871034462125497701124931",
"99947493962930376708986405247947394548",
"174515295773438071983196374295669215119",
"81172954278717169056623609546566558359",
"134488211543690704665537589732670141510",
"285849152819725927434620511289557508937"
],
"threshold": 0.9
},
"signature_type": "Line"
},
{
"digest": {
"function_hash": "338959286858781008486092318421483255388",
"length": 152.0
},
"signature_version": "v1",
"target": {
"file": "core/src/test/java/org/bouncycastle/crypto/test/DSTU7624Test.java",
"function": "performTest"
},
"deprecated": false,
"id": "CVE-2026-58061-f684faa0",
"source": "https://github.com/bcgit/bc-java/commit/08d675106bb663ddcc6ec0a4af6f6f62f512697b",
"signature_type": "Function"
}
]
"2026-08-12T15:20:45Z"
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-58061.json"