Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/bincyber/go-sqlcrypter
  4. ›
  5. GHSA-2j6r-9vv4-6gf5

GHSA-2j6r-9vv4-6gf5: github.com/bincyber/go-sqlcrypter vulnerable to IV collision

May 20, 2024

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

  • github.com/advisories/GHSA-2j6r-9vv4-6gf5
  • github.com/bincyber/go-sqlcrypter
  • github.com/bincyber/go-sqlcrypter/commit/96c73cd2b8fd15c9da9b3eafe62c9a040f6537e8
  • github.com/bincyber/go-sqlcrypter/issues/127
  • github.com/bincyber/go-sqlcrypter/pull/128
  • pkg.go.dev/vuln/GO-2024-2451

Code Behaviors & Features

Detect and mitigate GHSA-2j6r-9vv4-6gf5 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.1.0 up to 0.2.0

Solution

Unfortunately, there is no solution available yet.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-327: Use of a Broken or Risky Cryptographic Algorithm

Source file

go/github.com/bincyber/go-sqlcrypter/GHSA-2j6r-9vv4-6gf5.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:46 +0000.