Vulnerability DatabaseGHSA-2j6r-9vv4-6gf5

GHSA-2j6r-9vv4-6gf5
vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-2j6r-9vv4-6gf5) affects the github.com/bincyber/go-sqlcrypter package, specifically versions 0.1.0 through 0.2.0. The issue involves a risk of IV (Initialization Vector) collision when using the awskms or aesgcm provider. This vulnerability was discovered and reported on October 25, 2023, and was published to the GitHub Advisory Database on May 20, 2024. The vulnerability has been assigned a low severity rating with a CVSS score of 3.7 (GitHub Advisory).

Technical details

According to NIST SP 800-38D section 8.3, it is unsafe to encrypt more than 2^32 plaintexts under the same key when using a random IV. The vulnerability specifically affects the implementation of encryption in both the awskms and aesgcm providers of the package. The technical assessment shows that the issue stems from the random IV generation method, which could lead to potential collisions when encrypting large amounts of data. The vulnerability has been assigned a CVSS v3.1 base score of 3.7, with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N (GitHub Advisory).

Impact

The impact of this vulnerability is particularly concerning in database column encryption scenarios, where the limit of 2^32 plaintexts could be reached. If an IV collision occurs, it could enable an attacker with access to the ciphertexts to decrypt all messages encrypted with the affected key. This is especially problematic as ciphertexts are likely to be persisted and stored together (GitHub Issue).

Exploitability

The vulnerability requires high attack complexity but no privileges or user interaction. The attack vector is network-based, and while there are no known instances of this vulnerability being exploited in the wild, the potential for exploitation exists particularly in scenarios where large amounts of data are being encrypted (GitHub Advisory).

Mitigation and workarounds

For the aesgcm provider, which cannot be fixed without a breaking change, users must not encrypt more than 2^32 values with any key. The awskms package has been fixed by switching to a counter-based IV, as implemented in PR #128. The fix involves changing from a random IV to a counter-based IV in a backward-compatible way (GitHub PR, GitHub Commit).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management