GHSA-2j6r-9vv4-6gf5

Suggest an improvement
Source
https://github.com/advisories/GHSA-2j6r-9vv4-6gf5
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/05/GHSA-2j6r-9vv4-6gf5/GHSA-2j6r-9vv4-6gf5.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-2j6r-9vv4-6gf5
Aliases
Published
2024-05-20T21:56:07Z
Modified
2024-06-05T16:42:27.412316Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
github.com/bincyber/go-sqlcrypter vulnerable to IV collision
Details

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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-327"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-20T21:56:07Z"
}
References

Affected packages

Go / github.com/bincyber/go-sqlcrypter

Package

Name
github.com/bincyber/go-sqlcrypter
View open source insights on deps.dev
Purl
pkg:golang/github.com/bincyber/go-sqlcrypter

Affected ranges

Type
SEMVER
Events
Introduced
0.1.0
Last affected
0.2.0