blob: f9e93401efeaaa102958da9c04f9d5623fe63616 [file] [log] [blame]
{
"schema_version": "1.3.1",
"id": "GO-2023-2385",
"modified": "0001-01-01T00:00:00Z",
"published": "0001-01-01T00:00:00Z",
"aliases": [
"CVE-2023-26154",
"GHSA-5844-q3fc-56rh"
],
"summary": "Insufficient entropy in AES-256-CBC in github.com/pubnub/go",
"details": "There is insufficient entropy in the implementation of the AES-256-CBC cryptographic algorithm. The provided encrypt functions are less secure when hex encoding and trimming are applied, leaving half of the bits in the key always the same for every encoded message or file.\n\nUsers are encouraged to migrate to the new crypto package introduced in v7.2.0.",
"affected": [
{
"package": {
"name": "github.com/pubnub/go",
"ecosystem": "Go"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"ecosystem_specific": {
"imports": [
{
"path": "github.com/pubnub/go/utils",
"symbols": [
"DecryptFile",
"DecryptString",
"EncryptCipherKey",
"EncryptFile",
"EncryptString",
"SerializeAndEncrypt",
"SerializeEncryptAndSerialize",
"aesCipher",
"generateIV",
"padWithPKCS7",
"unpadPKCS7"
]
}
]
}
},
{
"package": {
"name": "github.com/pubnub/go/v5",
"ecosystem": "Go"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"ecosystem_specific": {
"imports": [
{
"path": "github.com/pubnub/go/v5/utils",
"symbols": [
"DecryptFile",
"DecryptString",
"EncryptCipherKey",
"EncryptFile",
"EncryptString",
"SerializeAndEncrypt",
"SerializeEncryptAndSerialize",
"aesCipher",
"generateIV",
"padWithPKCS7",
"unpadPKCS7"
]
}
]
}
},
{
"package": {
"name": "github.com/pubnub/go/v6",
"ecosystem": "Go"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"ecosystem_specific": {
"imports": [
{
"path": "github.com/pubnub/go/v6/utils",
"symbols": [
"DecryptFile",
"DecryptString",
"EncryptCipherKey",
"EncryptFile",
"EncryptString",
"SerializeAndEncrypt",
"SerializeEncryptAndSerialize",
"aesCipher",
"generateIV",
"padWithPKCS7",
"unpadPKCS7"
]
}
]
}
},
{
"package": {
"name": "github.com/pubnub/go/v7",
"ecosystem": "Go"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"ecosystem_specific": {
"imports": [
{
"path": "github.com/pubnub/go/v7/utils",
"symbols": [
"DecryptFile",
"DecryptString",
"EncryptCipherKey",
"EncryptFile",
"EncryptString",
"SerializeAndEncrypt",
"SerializeEncryptAndSerialize",
"aesCipher",
"generateIV",
"padWithPKCS7",
"unpadPKCS7"
]
}
]
}
},
{
"package": {
"name": "github.com/pubnub/go/v7",
"ecosystem": "Go"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "7.2.0"
}
]
}
],
"ecosystem_specific": {
"imports": [
{
"path": "github.com/pubnub/go/v7/crypto",
"symbols": [
"EncryptCipherKey",
"NewAesCbcCryptoModule",
"NewLegacyCryptoModule",
"NewLegacyCryptor",
"defaultExtendedCryptor.DecryptStream",
"defaultExtendedCryptor.EncryptStream",
"legacyAesCipher",
"legacyCryptor.Decrypt",
"legacyCryptor.DecryptStream",
"legacyCryptor.Encrypt",
"legacyCryptor.EncryptStream",
"module.Decrypt",
"module.DecryptStream",
"module.Encrypt",
"module.EncryptStream"
]
}
]
}
}
],
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-5844-q3fc-56rh"
},
{
"type": "FIX",
"url": "https://github.com/pubnub/go/commit/428517fef5b901db7275d9f5a75eda89a4c28e08"
}
],
"database_specific": {
"url": "https://pkg.go.dev/vuln/GO-2023-2385",
"review_status": "REVIEWED"
}
}