CVE-2023-26154
MEDIUM 5.9CVSS 3.1pubnub Insufficient Entropy vulnerability
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.
- Published
- 6 Dec 2023
- Last modified
- 7 Jul 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-331
- Also known as
- GHSA-5844-q3fc-56rhGO-2023-2385PYSEC-2026-1807
- Sources
- NVDJSONOSV GHSA-5844-q3fc-56rhJSONOSV GO-2023-2385JSONOSV PYSEC-2026-1807JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pubnub | c-corecpe:2.3:a:pubnub:c-core:*:*:*:*:*:*:*:* |
< 4.5.0 | 4.5.0 |
| NVD | pubnub | kotlincpe:2.3:a:pubnub:kotlin:*:*:*:*:*:*:*:* |
< 7.7.0 | 7.7.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
< 0.4.0 | 0.4.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:go:*:* |
< 7.2.0 | 7.2.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
>= 3.6.4, < 4.3.0 | 4.3.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
>= 4.3.1, < 5.2.0 | 5.2.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
>= 6.0.0, < 6.1.0 | 6.1.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
>= 6.2.0, < 6.19.0 | 6.19.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
>= 7.0.0, < 7.3.0 | 7.3.0 |
| NVD | pubnub | pubnubcpe:2.3:a:pubnub:pubnub:*:*:*:*:*:-:*:* |
>= 7.3.1, < 7.4.0 | 7.4.0 |
| NVD | pubnub | swiftcpe:2.3:a:pubnub:swift:*:*:*:*:*:*:*:* |
< 6.2.0 | 6.2.0 |
| OSV | npm | pubnub | < 7.4.0 | 7.4.0 |
| OSV | Maven | com.pubnub:pubnub-kotlin | < 7.7.0 | 7.7.0 |
| OSV | Maven | com.pubnub:pubnub | <= 4.6.5 | |
| OSV | Go | github.com/pubnub/go/v7 | < 7.2.0 | 7.2.0 |
| OSV | Go | github.com/pubnub/go | < 0.0.0-20231016150651-428517fef5b9 | 0.0.0-20231016150651-428517fef5b9 |
| OSV | Go | github.com/pubnub/go/v6 | < 6.1.1-0.20231016150651-428517fef5b9 | 6.1.1-0.20231016150651-428517fef5b9 |
| OSV | Go | github.com/pubnub/go/v5 | < 5.0.4-0.20231016150651-428517fef5b9 | 5.0.4-0.20231016150651-428517fef5b9 |
| OSV | NuGet | Pubnub | < 6.19.0 | 6.19.0 |
| OSV | SwiftURL | github.com/pubnub/swift | < 6.2.0 | 6.2.0 |
| OSV | RubyGems | pubnub | < 5.3.0 | 5.3.0 |
| OSV | crates.io | pubnub | < 0.4.0 | 0.4.0 |
| OSV | Packagist | pubnub/pubnub | < 6.1.0 | 6.1.0 |
| OSV | Pub | pubnub | < 4.3.0 | 4.3.0 |
| OSV | PyPI | pubnub | < 7.3.0 | 7.3.0 |
| OSV | Go | github.com/pubnub/go | all versions | |
| OSV | Go | github.com/pubnub/go/v5 | all versions | |
| OSV | Go | github.com/pubnub/go/v6 | all versions |
References
- https://gist.github.com/vargad/20237094fce7a0a28f0723d7ce395bb0 · Exploit, Issue Tracking, WEB
- https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js%23L70 · Broken Link
- https://github.com/pubnub/javascript/commit/fb6cd0417cbb4ba87ea2d5d86a9c94774447e119 · Patch, WEB
- https://security.snyk.io/vuln/SNYK-COCOAPODS-PUBNUB-6098384 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-DOTNET-PUBNUB-6098372 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGO-6098373 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGOV7-6098374 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098371 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098380 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-JS-PUBNUB-5840690 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-PHP-PUBNUBPUBNUB-6098376 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-PUB-PUBNUB-6098385 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-PYTHON-PUBNUB-6098375 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-RUBY-PUBNUB-6098377 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-RUST-PUBNUB-6098378 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-SWIFT-PUBNUBSWIFT-6098381 · Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-UNMANAGED-PUBNUBCCORE-6098379 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-26154 · ADVISORY
- https://github.com/pubnub/go/commit/428517fef5b901db7275d9f5a75eda89a4c28e08 · WEB, FIX
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/pubnub/CVE-2023-26154.yml · WEB
- https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js#L70 · WEB
- https://github.com/pubnub/javascript · PACKAGE
- https://github.com/advisories/GHSA-5844-q3fc-56rh · ADVISORY
- https://pypi.org/project/pubnub · PACKAGE
History
- 25 Nov 2026 20:37 UTC · NVD: first stored (published 6 Dec 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Jan 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 6 Dec 2023)