{"id":"CVE-2026-87877","state":"PUBLISHED","title":"zstd-jni 1.3.8-4 through 1.5.7-13 Use-After-Free via Setters Called After close()","description":"zstd-jni versions before 1.5.7-14 fail to validate closed state in setDict, setLongMax, setLevel and setRefMultipleDDicts methods of stream classes. Attackers can call these methods on closed streams to write through freed native pointers, corrupting unrelated objects or crashing the JVM.","publishedAt":"2026-09-09T14:32:45.512Z","updatedAt":"2026-09-09T15:57:53.652Z","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-2jw3-mg7f-vw4q","https://github.com/luben/zstd-jni/commit/f38f9a1563113d96d0fc38baee543f7457dd8a8e","https://github.com/luben/zstd-jni/commit/393d7311766abbc285b149302c0fe1f94b16d555","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/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/ZstdInputStreamNoFinalizer.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-via-setters-called-after-close"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/87xxx/CVE-2026-87877.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-87877","state":"PUBLISHED","datePublished":"2026-09-09T14:32:45.512Z","dateUpdated":"2026-09-09T15:57:53.652Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-09-09T14:02:07.708Z"},"containers":{"cna":{"title":"zstd-jni 1.3.8-4 through 1.5.7-13 Use-After-Free via Setters Called After close()","descriptions":[{"lang":"en","value":"zstd-jni versions before 1.5.7-14 fail to validate closed state in setDict, setLongMax, setLevel and setRefMultipleDDicts methods of stream classes. Attackers can call these methods on closed streams to write through freed native pointers, corrupting unrelated objects or crashing the JVM."}],"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-2jw3-mg7f-vw4q","tags":["vendor-advisory"],"name":"GitHub Security Advisory (GHSA-2jw3-mg7f-vw4q)"},{"url":"https://github.com/luben/zstd-jni/commit/f38f9a1563113d96d0fc38baee543f7457dd8a8e","tags":["patch"],"name":"Fix commit: closed-state guards on BaseZstdBufferDecompressingStreamNoFinalizer"},{"url":"https://github.com/luben/zstd-jni/commit/393d7311766abbc285b149302c0fe1f94b16d555","tags":["patch"],"name":"Fix commit: closed-state guards on the input and output stream setters"},{"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":"Setters without the closed-state guard that readInternal already has, at v1.5.7-13"},{"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":"final stream handle retained after close 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 write through the retained native stream handle (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-via-setters-called-after-close","name":"VulnCheck Advisory: zstd-jni 1.3.8-4 through 1.5.7-13 Use-After-Free via Setters Called After close()","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:45.512Z"},"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-2jw3-mg7f-vw4q","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-09-09T15:57:38.917828Z","id":"CVE-2026-87877","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-09T15:57:53.652Z"}}]}}}