CVE-2023-26154
JSON

5.9medium

pubnub Insufficient Entropy vulnerability

Severity
5.9medium CVSS:3.1 by snyk
Exploit likelihood
0.96% (higher than 62% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-5844-q3fc-56rhGO-2023-2385PYSEC-2026-1807

Description

Versions of the package pubnub before 7.4.0; all versions of the package com.pubnub:pubnub; versions of the package pubnub before 6.19.0; all versions of the package github.com/pubnub/go; versions of the package github.com/pubnub/go/v7 before 7.2.0; versions of the package pubnub before 7.3.0; versions of the package pubnub/pubnub before 6.1.0; versions of the package pubnub before 5.3.0; versions of the package pubnub before 0.4.0; versions of the package pubnub/c-core before 4.5.0; versions of the package com.pubnub:pubnub-kotlin before 7.7.0; versions of the package pubnub/swift before 6.2.0; versions of the package pubnub before 5.2.0; versions of the package pubnub before 4.3.0 are vulnerable to Insufficient Entropy via the getKey function, due to inefficient implementation of the AES-256-CBC cryptographic algorithm. The provided encrypt function is 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. **Note:** In order to exploit this vulnerability, the attacker needs to invest resources in preparing the attack and brute-force the encryption.

Affected

Product or packageVersionsReported by
pubnubbefore 7.4.0, before 6.19.0, before 7.3.0, before 5.3.0, before 0.4.0, before 5.2.0, before 4.3.0CVE List
com.pubnub:pubnubbefore *CVE List
github.com/pubnub/gobefore *CVE List
github.com/pubnub/go/v7before 7.2.0CVE List
pubnub/pubnubbefore 6.1.0CVE List
pubnub/c-corebefore 4.5.0CVE List
com.pubnub:pubnub-kotlinbefore 7.7.0CVE List
pubnub/swiftbefore 6.2.0CVE List
pubnub (npm)before 7.4.0GitHub Advisory Database
com.pubnub:pubnub-kotlin (Maven)before 7.7.0GitHub Advisory Database
com.pubnub:pubnub (Maven)up to 4.6.5GitHub Advisory Database
github.com/pubnub/go/v7 (Go)before 7.2.0GitHub Advisory Database, Go Vulnerability Database

All scores

snyk5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
PyPA Advisory Database5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

What each source says

CVE List

Versions of the package pubnub before 7.4.0; all versions of the package com.pubnub:pubnub; versions of the package pubnub before 6.19.0; all versions of the package github.com/pubnub/go; versions of the package github.com/pubnub/go/v7 before 7.2.0; versions of the package pubnub before 7.3.0; versions of the package pubnub/pubnub before 6.1.0; versions of the package pubnub before 5.3.0; versions of the package pubnub before 0.4.0; versions of the package pubnub/c-core before 4.5.0; versions of the package com.pubnub:pubnub-kotlin before 7.7.0; versions of the package pubnub/swift before 6.2.0; versions of the package pubnub before 5.2.0; versions of the package pubnub before 4.3.0 are vulnerable to Insufficient Entropy via the getKey function, due to inefficient implementation of the AES-256-CBC cryptographic algorithm. The provided encrypt function is 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. **Note:** In order to exploit this vulnerability, the attacker needs to invest resources in preparing the attack and brute-force the encryption.

Go Vulnerability Database

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.

NVD (es)

Versiones del paquete pubnub anteriores a 7.4.0; todas las versiones del paquete com.pubnub:pubnub; versiones del paquete pubnub anteriores a 6.19.0; todas las versiones del paquete github.com/pubnub/go; versiones del paquete github.com/pubnub/go/v7 anteriores a 7.2.0; versiones del paquete pubnub anteriores a 7.3.0; versiones del paquete pubnub/pubnub anteriores a 6.1.0; versiones del paquete pubnub anteriores a 5.3.0; versiones del paquete pubnub anteriores a 0.4.0; versiones del paquete pubnub/c-core anteriores a 4.5.0; versiones del paquete com.pubnub:pubnub-kotlin anteriores a 7.7.0; versiones del paquete pubnub/swift anteriores a 6.2.0; versiones del paquete pubnub anteriores a 5.2.0; Las versiones del paquete pubnub anteriores a la 4.3.0 son vulnerables a una entropía insuficiente a través de la función getKey, debido a una implementación ineficiente del algoritmo criptográfico AES-256-CBC. La función de cifrado proporcionada es menos segura cuando se aplica codificación y recorte hexadecimal, dejando la mitad de los bits de la clave siempre igual para cada mensaje o archivo codificado. **Nota:** Para aprovechar esta vulnerabilidad, el atacante necesita invertir recursos en preparar el ataque y aplicar fuerza bruta al cifrado.

References

https://security.snyk.io/vuln/SNYK-JS-PUBNUB-5840690third-party-advisory, web
https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098371third-party-advisory, web
https://security.snyk.io/vuln/SNYK-DOTNET-PUBNUB-6098372third-party-advisory, web
https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGO-6098373third-party-advisory, web
https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGOV7-6098374third-party-advisory, web
https://security.snyk.io/vuln/SNYK-PYTHON-PUBNUB-6098375third-party-advisory, web
https://security.snyk.io/vuln/SNYK-PHP-PUBNUBPUBNUB-6098376third-party-advisory, web
https://security.snyk.io/vuln/SNYK-RUBY-PUBNUB-6098377third-party-advisory, web
https://security.snyk.io/vuln/SNYK-RUST-PUBNUB-6098378third-party-advisory, web
https://security.snyk.io/vuln/SNYK-UNMANAGED-PUBNUBCCORE-6098379third-party-advisory, web
https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098380third-party-advisory, web
https://security.snyk.io/vuln/SNYK-SWIFT-PUBNUBSWIFT-6098381third-party-advisory, web

Sources

SourceRecordLicence
CVE ListCVE-2023-26154 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-5844-q3fc-56rh changed 2026-07-07CC-BY-4.0
Go Vulnerability DatabaseGO-2023-2385 changed 2026-07-07CC-BY-4.0
NVDCVE-2023-26154 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1807 changed 2026-07-07CC-BY-4.0