{"id":"CVE-2026-87825","state":"PUBLISHED","title":"zstd-jni 1.3.8-4 through 1.5.7-13 Use-After-Free of Compression and Decompression Dictionaries","description":"zstd-jni before 1.5.7-14 contains a use-after-free vulnerability where streams and contexts hold a dictionary's shared lock only during the load call, allowing the dictionary to be closed while still referenced. Attackers can close a dictionary after associating it with a stream or context, causing subsequent read or write operations to access freed native memory, resulting in silent data corruption or JVM crashes.","publishedAt":"2026-09-09T14:32:44.795Z","updatedAt":"2026-09-14T13:35:21.082Z","severity":{"score":7,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck"},"assigner":"VulnCheck","products":["luben zstd-jni"],"affected":[{"vendor":"luben","product":"zstd-jni","packageURL":"pkg:maven/com.github.luben/zstd-jni","defaultStatus":"unaffected","versions":[{"version":"1.3.8-4","status":"affected","lessThan":"1.5.7-14","versionType":"custom"}],"collectionURL":"https://repo1.maven.org/maven2/com/github/luben/zstd-jni/","repo":"https://github.com/luben/zstd-jni"}],"references":["https://github.com/luben/zstd-jni/security/advisories/GHSA-947w-pxjj-c7m9","https://github.com/luben/zstd-jni/commit/393d7311766abbc285b149302c0fe1f94b16d555","https://github.com/luben/zstd-jni/commit/a560131d7834598afd9cea6b7c107bc88e915936","https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/ZstdInputStreamNoFinalizer.java","https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/BaseZstdBufferDecompressingStreamNoFinalizer.java","https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14","https://github.com/luben/zstd-jni/commit/0827ed02551bbd8d6f8e4bbff99d83bf50f91938","https://github.com/luben/zstd-jni","https://www.vulncheck.com/advisories/zstd-jni-1.3.8-4-through-1.5.7-13-use-after-free-of-compression-and-decompression-dictionaries"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/87xxx/CVE-2026-87825.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-87825","state":"PUBLISHED","datePublished":"2026-09-09T14:32:44.795Z","dateUpdated":"2026-09-14T13:35:21.082Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-09-09T10:32:34.110Z"},"containers":{"cna":{"title":"zstd-jni 1.3.8-4 through 1.5.7-13 Use-After-Free of Compression and Decompression Dictionaries","descriptions":[{"lang":"en","value":"zstd-jni before 1.5.7-14 contains a use-after-free vulnerability where streams and contexts hold a dictionary's shared lock only during the load call, allowing the dictionary to be closed while still referenced. Attackers can close a dictionary after associating it with a stream or context, causing subsequent read or write operations to access freed native memory, resulting in silent data corruption or JVM crashes."}],"affected":[{"vendor":"luben","product":"zstd-jni","packageURL":"pkg:maven/com.github.luben/zstd-jni","defaultStatus":"unaffected","versions":[{"version":"1.3.8-4","status":"affected","lessThan":"1.5.7-14","versionType":"custom"}],"collectionURL":"https://repo1.maven.org/maven2/com/github/luben/zstd-jni/","repo":"https://github.com/luben/zstd-jni"}],"references":[{"url":"https://github.com/luben/zstd-jni/security/advisories/GHSA-947w-pxjj-c7m9","tags":["vendor-advisory"],"name":"GitHub Security Advisory (GHSA-947w-pxjj-c7m9)"},{"url":"https://github.com/luben/zstd-jni/commit/393d7311766abbc285b149302c0fe1f94b16d555","tags":["patch"],"name":"Fix commit: hold the dictionary shared lock for the stream's usage window"},{"url":"https://github.com/luben/zstd-jni/commit/a560131d7834598afd9cea6b7c107bc88e915936","tags":["patch"],"name":"Fix commit: cross-object lifetime tracking for dictionaries and contexts"},{"url":"https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/ZstdInputStreamNoFinalizer.java","tags":["technical-description"],"name":"Shared lock released as soon as the dictionary is loaded at v1.5.7-13"},{"url":"https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/BaseZstdBufferDecompressingStreamNoFinalizer.java","tags":["technical-description"],"name":"Same lock lifecycle in the buffer stream base class at v1.5.7-13"},{"url":"https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14","tags":["release-notes"],"name":"zstd-jni v1.5.7-14 Release Notes"},{"url":"https://github.com/luben/zstd-jni/commit/0827ed02551bbd8d6f8e4bbff99d83bf50f91938","tags":["technical-description","patch"],"name":"Commit that made setDict load the dictionary eagerly into the native context (first released in 1.3.8-4)"},{"url":"https://github.com/luben/zstd-jni","tags":["product"]},{"url":"https://www.vulncheck.com/advisories/zstd-jni-1.3.8-4-through-1.5.7-13-use-after-free-of-compression-and-decompression-dictionaries","name":"VulnCheck Advisory: zstd-jni 1.3.8-4 through 1.5.7-13 Use-After-Free of Compression and Decompression Dictionaries","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":7,"baseSeverity":"HIGH"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":7.7,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","description":"Use After Free","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-09-09T14:32:44.795Z"},"datePublic":"2026-08-19T00:00:00.000Z","credits":[{"lang":"en","value":"Yu Bao, PayPal Cyber Security Team","type":"finder"}],"x_generator":{"engine":"vulncheck-endgame"},"source":{"discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/luben/zstd-jni/security/advisories/GHSA-947w-pxjj-c7m9","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-09-14T13:34:20.357216Z","id":"CVE-2026-87825","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-14T13:35:21.082Z"}}]}}}