3.7low
github.com/bincyber/go-sqlcrypter vulnerable to IV collision
- Severity
- 3.7low CVSS:3.1 by GitHub
- Published
- Last changed
- Also known as
- GO-2024-2872
Description
There is a risk of an IV collision using the awskms or aesgcm provider. NIST SP 800-38D section 8.3 states that it is unsafe to encrypt more than 2^32 plaintexts under the same key when using a random IV. The limit could easily be reached given the use case of database column encryption. Ciphertexts are likely to be persisted and stored together. IV collision could enable an attacker with access to the ciphertexts to decrypt all messages encrypted with the affected key.
The aesgcm provider cannot be fixed without a breaking change, so users should not encrypt more than 2^32 values with any key. The awskms package can be fixed without a breaking change by switching to a counter-based IV.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| github.com/bincyber/go-sqlcrypter (Go) | from 0.1.0 up to 0.2.0, from 0.1.0 | GitHub Advisory Database, Go Vulnerability Database |
Classification
What each source says
GitHub Advisory Database
There is a risk of an IV collision using the awskms or aesgcm provider. NIST SP 800-38D section 8.3 states that it is unsafe to encrypt more than 2^32 plaintexts under the same key when using a random IV. The limit could easily be reached given the use case of database column encryption. Ciphertexts are likely to be persisted and stored together. IV collision could enable an attacker with access to the ciphertexts to decrypt all messages encrypted with the affected key.
The aesgcm provider cannot be fixed without a breaking change, so users should not encrypt more than 2^32 values with any key. The awskms package can be fixed without a breaking change by switching to a counter-based IV.
Go Vulnerability Database
github.com/bincyber/go-sqlcrypter vulnerable to IV collision
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-2j6r-9vv4-6gf5 changed 2024-06-05 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-2872 changed 2026-03-03 | CC-BY-4.0 |