GO-2024-2451

Source
https://pkg.go.dev/vuln/GO-2024-2451
Import Source
https://vuln.go.dev/ID/GO-2024-2451.json
JSON Data
https://api.test.osv.dev/v1/vulns/GO-2024-2451
Published
2024-01-30T16:25:00Z
Modified
2024-05-20T16:03:47Z
Summary
IV collision in github.com/bincyber/go-sqlcrypter
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
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2024-2451"
}
References
Credits
    • @takeyourhatoff

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

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/bincyber/go-sqlcrypter/providers/aesgcm",
            "symbols": [
                "New"
            ]
        },
        {
            "path": "github.com/bincyber/go-sqlcrypter/providers/awskms",
            "symbols": [
                "New"
            ]
        }
    ]
}