CVE-2020-8929
mediumpriority · track · 21OT risk · elevatedEPSS 0.005 · 40 %ileEUUSEPSS · scored 2026-10-28
A mis-handling of invalid unicode characters in the Java implementation of Tink versions prior to 1.5 allows an attacker to change the ID part of a ciphertext, which result in the creation of a second ciphertext that can decrypt to the same plaintext. This can be a problem with encrypting deterministic AEAD with a single key, and rely on a unique ciphertext-per-plaintext.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-g5vf-v6wf-7w2rCiphertext Malleability Issue in Tink Java2020-10-16ghsa · osvUS
### Impact Tink'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. No loss of confidentiality or loss of plaintext integrity occurs due to this problem, only ciphertext integrity is compromised. ### Patches The issue was fixed in this [pull request](https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899). ### Workarounds The only workaround is to backport the fixing [pull request](https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899). ### Details Tink 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). ### Acknowledgements We'd like to thank Peter Esbensen for finding this issue and raising it internally. ### For more information If you have any questions or comments about this advisory: * Open an issue in [Tink](https://github.com/google/tink/issues)
- PYSEC-2020-1422020-10-19vendor · osvUS
A mis-handling of invalid unicode characters in the Java implementation of Tink versions prior to 1.5 allows an attacker to change the ID part of a ciphertext, which result in the creation of a second ciphertext that can decrypt to the same plaintext. This can be a problem with encrypting deterministic AEAD with a single key, and rely on a unique ciphertext-per-plaintext.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899cnnvd
- https://github.com/google/tink/security/advisories/GHSA-g5vf-v6wf-7w2rcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2020-8929cnnvd
- https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899enisa_euvd
- https://github.com/google/tink/security/advisories/GHSA-g5vf-v6wf-7w2renisa_euvd
- https://github.com/google/tink/commit/93d839a5865b9d950dffdc9d0bc99b71280a8899PatchThird Party Advisorynvd
- https://github.com/google/tink/security/advisories/GHSA-g5vf-v6wf-7w2rPatchThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan