CVE-2020-8929: Tink Ciphertext Malleability Issue Vulnerability
MODERATECVE-2020-8929 is a MODERATE (CVSS 5.3) ciphertext malleability issue vulnerability (CWE-176: Improper Handling of Unicode Encoding) affecting Tink libraries in the Maven ecosystem. The issue involves ciphertext malleability issue in tink java. Remediation is available by upgrading affected packages to version 1.5.0.
CVE-2020-8929 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2020-8929
To remediate this vulnerability, upgrade all affected Tink dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>com.google.crypto.tink</groupId>
<artifactId>tink</artifactId>
<version>1.5.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.google.crypto.tink
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2020-8929, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.google.crypto.tink
Analyze the terminal output to locate any version of Tink in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.google.crypto.tink command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-176: Improper Handling of Unicode Encoding, where the product does not properly handle when an input contains unicode encoding. In Tink, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-8929 Affected Tink Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.google.crypto.tink:tink
|
Maven |
< 1.5.0
|
1.5.0
|
References
Frequently Asked Questions
What is CVE-2020-8929?
Which Tink versions are affected?
What version fixes CVE-2020-8929?
Is tink affected?
What is the CVSS score of CVE-2020-8929?
What CWE is associated with CVE-2020-8929?
How can I check Maven dependencies for CVE-2020-8929?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g5vf-v6wf-7w2r",
"modified" : "2025-06-05T16:44:52Z",
"published" : "2020-10-16T00:51:24Z",
"aliases" : [ "CVE-2020-8929" ],
"summary" : "Ciphertext Malleability Issue in Tink Java",
"details" : "### Impact\nTink's Java version before 1.5 under some circumstances allowed attackers to change the key ID part of the ciphertext, resulting in the attacker creating a second ciphertext that will decrypt to the same plaintext. This can be a problem in particular in the case of encrypting with a deterministic AEAD with a single key, and relying on the fact that there is only a single valid ciphertext per plaintext.\n\nNo loss of confidentiality or loss of plaintext integrity occurs due to this problem, only ciphertext integrity is compromised.\n\n### Patches\nThe issue was fixed in this [pull request](https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899).\n\n### Workarounds\nThe only workaround is to backport the fixing [pull request](https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899).\n\n### Details\nTink uses the first five bytes of a ciphertext for a version byte and a four byte key ID. Since each key has a well defined prefix, this extends non-malleability properties (but technically not indistinguishability). However, in the Java version this prefix lookup used a hash map indexed by unicode strings instead of the byte array, which means that invalid Unicode characters would be [replaced by U+FFFD](https://en.wikipedia.org/wiki/UTF-8#Invalid_sequences_and_error_handling) by the [Java API's default behavior](https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#String(byte[],%20java.nio.charset.Charset)). This means several different values for the five bytes would result in the same hash table key, which allows an attacker to exchange one invalid byte sequence for another, creating a mutated ciphertext that still decrypts (to the same plaintext).\n\n### Acknowledgements\nWe'd like to thank Peter Esbensen for finding this issue and raising it internally.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Tink](https://github.com/google/tink/issues)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.google.crypto.tink:tink"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/google/tink/security/advisories/GHSA-g5vf-v6wf-7w2r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8929"
}, {
"type" : "WEB",
"url" : "https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/tink/PYSEC-2020-142.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-176", "CWE-327" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-16T00:49:43Z",
"nvd_published_at" : "2020-10-19T13:15:13Z"
}
}