GHSA-2j6r-9vv4-6gf5 json
github.com/bincyber/go-sqlcrypter vulnerable to IV collision
published 2y ago modified 8mo ago also GO-2024-2872
- cvss
- 3.7
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- github.com/bincyber/go-sqlcrypter@96c73cd commit
- github.com/bincyber/go-sqlcrypter#128 pull request
Is GHSA-2j6r-9vv4-6gf5 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/bincyber/go-sqlcrypter | >=0.1.0, <=0.2.0 >=0.1.0 |
no fix listed |
Classification
- Weakness
-
- CWE-327 Use of a Broken or Risky Cryptographic Algorithm
References
-
github.com
/bincyber/go-sqlcrypter/pull/128
web, patch
-
github.com
/bincyber/go-sqlcrypter/commit/96c73cd2b8fd15c9da9b3eafe62c9a040f6537e8
web, patch
-
github.com
/bincyber/go-sqlcrypter/issues/127
web, report
-
github.com
/bincyber/go-sqlcrypter
package
-
pkg.go.dev
/vuln/GO-2024-2451
web
-
github.com
/advisories/GHSA-2j6r-9vv4-6gf5
advisory
Sources
- GitHub Advisory GHSA-2j6r-9vv4-6gf5
- OSV GO-2024-2872
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.