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 package | Versions | Reported by |
|---|---|---|
| pubnub | before 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.0 | CVE List |
| com.pubnub:pubnub | before * | CVE List |
| github.com/pubnub/go | before * | CVE List |
| github.com/pubnub/go/v7 | before 7.2.0 | CVE List |
| pubnub/pubnub | before 6.1.0 | CVE List |
| pubnub/c-core | before 4.5.0 | CVE List |
| com.pubnub:pubnub-kotlin | before 7.7.0 | CVE List |
| pubnub/swift | before 6.2.0 | CVE List |
| pubnub (npm) | before 7.4.0 | GitHub Advisory Database |
| com.pubnub:pubnub-kotlin (Maven) | before 7.7.0 | GitHub Advisory Database |
| com.pubnub:pubnub (Maven) | up to 4.6.5 | GitHub Advisory Database |
| github.com/pubnub/go/v7 (Go) | before 7.2.0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/pubnub/go (Go) | before 0.0.0-20231016150651-428517fef5b9, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/pubnub/go/v6 (Go) | before 6.1.1-0.20231016150651-428517fef5b9, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/pubnub/go/v5 (Go) | before 5.0.4-0.20231016150651-428517fef5b9, all versions | GitHub Advisory Database, Go Vulnerability Database |
| Pubnub (NuGet) | before 6.19.0 | GitHub Advisory Database |
| github.com/pubnub/swift (SwiftURL) | before 6.2.0 | GitHub Advisory Database |
| pubnub (RubyGems) | before 5.3.0 | GitHub Advisory Database |
| pubnub (crates.io) | before 0.4.0 | GitHub Advisory Database |
| pubnub/pubnub (Packagist) | before 6.1.0 | GitHub Advisory Database |
| pubnub (Pub) | before 4.3.0 | GitHub Advisory Database |
| pubnub (PyPI) | before 7.3.0 | GitHub Advisory Database, PyPA Advisory Database |
| pubnub c-core | before 4.5.0 | NVD |
| pubnub kotlin | before 7.7.0 | NVD |
| pubnub pubnub | before 0.4.0, before 7.2.0, from 3.6.4 before 4.3.0, from 4.3.1 before 5.2.0, from 6.0.0 before 6.1.0, from 6.2.0 before 6.19.0, from 7.0.0 before 7.3.0, from 7.3.1 before 7.4.0 | NVD |
| pubnub swift | before 6.2.0 | NVD |
All scores
| snyk | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 5.9medium CVSS:3.1 | CVSS: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
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-26154 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5844-q3fc-56rh changed 2026-07-07 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2023-2385 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2023-26154 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1807 changed 2026-07-07 | CC-BY-4.0 |