GO-2023-2385

Source
https://pkg.go.dev/vuln/GO-2023-2385
Import Source
https://vuln.go.dev/ID/GO-2023-2385.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2023-2385
Aliases
Published
2024-01-02T18:32:37Z
Modified
2024-05-20T16:03:47Z
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.

Users are encouraged to migrate to the new crypto package introduced in v7.2.0.

References

Affected packages

Go / github.com/pubnub/go

Package

Name
github.com/pubnub/go
View open source insights on deps.dev
Purl
pkg:golang/github.com/pubnub/go

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/pubnub/go/utils",
            "symbols": [
                "DecryptFile",
                "DecryptString",
                "EncryptCipherKey",
                "EncryptFile",
                "EncryptString",
                "SerializeAndEncrypt",
                "SerializeEncryptAndSerialize",
                "aesCipher",
                "generateIV",
                "padWithPKCS7",
                "unpadPKCS7"
            ]
        }
    ]
}

Go / github.com/pubnub/go/v5

Package

Name
github.com/pubnub/go/v5
View open source insights on deps.dev
Purl
pkg:golang/github.com/pubnub/go/v5

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/pubnub/go/v5/utils",
            "symbols": [
                "DecryptFile",
                "DecryptString",
                "EncryptCipherKey",
                "EncryptFile",
                "EncryptString",
                "SerializeAndEncrypt",
                "SerializeEncryptAndSerialize",
                "aesCipher",
                "generateIV",
                "padWithPKCS7",
                "unpadPKCS7"
            ]
        }
    ]
}

Go / github.com/pubnub/go/v6

Package

Name
github.com/pubnub/go/v6
View open source insights on deps.dev
Purl
pkg:golang/github.com/pubnub/go/v6

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/pubnub/go/v6/utils",
            "symbols": [
                "DecryptFile",
                "DecryptString",
                "EncryptCipherKey",
                "EncryptFile",
                "EncryptString",
                "SerializeAndEncrypt",
                "SerializeEncryptAndSerialize",
                "aesCipher",
                "generateIV",
                "padWithPKCS7",
                "unpadPKCS7"
            ]
        }
    ]
}

Go / github.com/pubnub/go/v7

Package

Name
github.com/pubnub/go/v7
View open source insights on deps.dev
Purl
pkg:golang/github.com/pubnub/go/v7

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/pubnub/go/v7/utils",
            "symbols": [
                "DecryptFile",
                "DecryptString",
                "EncryptCipherKey",
                "EncryptFile",
                "EncryptString",
                "SerializeAndEncrypt",
                "SerializeEncryptAndSerialize",
                "aesCipher",
                "generateIV",
                "padWithPKCS7",
                "unpadPKCS7"
            ]
        }
    ]
}

Go / github.com/pubnub/go/v7

Package

Name
github.com/pubnub/go/v7
View open source insights on deps.dev
Purl
pkg:golang/github.com/pubnub/go/v7

Affected 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"
            ]
        }
    ]
}