Skip to content

github.com/bincyber/go-sqlcrypter vulnerable to IV collision

Low severity GitHub Reviewed Published May 20, 2024 to the GitHub Advisory Database • Updated May 20, 2024

Package

gomod github.com/bincyber/go-sqlcrypter (Go)

Affected versions

>= 0.1.0, <= 0.2.0

Patched versions

None

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.

References

Published to the GitHub Advisory Database May 20, 2024
Reviewed May 20, 2024
Last updated May 20, 2024

Severity

Low
3.7
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-2j6r-9vv4-6gf5
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.