CVE-2023-26154
pubnub Insufficient Entropy vulnerability
Also known as GHSA-5844-q3fc-56rh, GO-2023-2385, PYSEC-2026-1807
Mitigation
- Upgrade pubnub to 7.3.0 or later.
- Upgrade github.com/pubnub/go to 0.0.0-20231016150651-428517fef5b9 or later.
- Upgrade github.com/pubnub/go/v5 to 5.0.4-0.20231016150651-428517fef5b9 or later.
- Upgrade github.com/pubnub/go/v6 to 6.1.1-0.20231016150651-428517fef5b9 or later.
- Upgrade github.com/pubnub/go/v7 to 7.2.0 or later.
- Upgrade pubnub to 7.4.0 or later.
- Upgrade com.pubnub:pubnub-kotlin to 7.7.0 or later.
- Upgrade Pubnub to 6.19.0 or later.
Who should check
- Projects that depend on PyPI package pubnub (< 7.3.0)
- Projects that depend on Go package github.com/pubnub/go
- Projects that depend on Go package github.com/pubnub/go/v5
- Projects that depend on Go package github.com/pubnub/go/v6
- Projects that depend on Go package github.com/pubnub/go/v7 (< 7.2.0)
- Projects that depend on npm package pubnub (< 7.4.0)
- Projects that depend on Maven package com.pubnub:pubnub-kotlin (< 7.7.0)
- Projects that depend on Maven package com.pubnub:pubnub (<= 4.6.5)
Vulnerability facts
- Affected
- pubnub < 7.3.0; github.com/pubnub/go; github.com/pubnub/go/v5; github.com/pubnub/go/v6; github.com/pubnub/go/v7 < 7.2.0; pubnub < 7.4.0; com.pubnub:pubnub-kotlin < 7.7.0; com.pubnub:pubnub <= 4.6.5; Pubnub < 6.19.0; github.com/pubnub/swift < 6.2.0; pubnub < 5.3.0; pubnub < 0.4.0; pubnub/pubnub < 6.1.0; pubnub < 4.3.0
- Fixed in
- 7.3.0, 0.0.0-20231016150651-428517fef5b9, 5.0.4-0.20231016150651-428517fef5b9, 6.1.1-0.20231016150651-428517fef5b9, 7.2.0, 7.4.0, 7.7.0, 6.19.0, 6.2.0, 5.3.0, 0.4.0, 6.1.0, 4.3.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.9 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.97% chance of exploitation in 30 days (percentile 61, 2026-11-26)
- CWE
- CWE-331
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI pubnub | < 7.3.0 | 7.3.0 | osv |
| Go github.com/pubnub/go | — | 0.0.0-20231016150651-428517fef5b9 | osv |
| Go github.com/pubnub/go/v5 | — | 5.0.4-0.20231016150651-428517fef5b9 | osv |
| Go github.com/pubnub/go/v6 | — | 6.1.1-0.20231016150651-428517fef5b9 | osv |
| Go github.com/pubnub/go/v7 | < 7.2.0 | 7.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 |
| 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 |
| pubnub | < 7.4.0 | — | cvelist |
| com.pubnub:pubnub | < * | — | cvelist |
| Pubnub | < 6.19.0 | — | cvelist |
| github.com/pubnub/go | < * | — | cvelist |
| github.com/pubnub/go/v7 | < 7.2.0 | — | cvelist |
| pubnub | < 7.3.0 | — | cvelist |
| pubnub/pubnub | < 6.1.0 | — | cvelist |
| pubnub | < 5.3.0 | — | cvelist |
| pubnub | < 0.4.0 | — | cvelist |
| pubnub/c-core | < 4.5.0 | — | cvelist |
| com.pubnub:pubnub-kotlin | < 7.7.0 | — | cvelist |
| pubnub/swift | < 6.2.0 | — | cvelist |
| PubNub | < 5.2.0 | — | cvelist |
| pubnub | < 4.3.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-26154. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-26154.md Affected: pubnub < 7.3.0; github.com/pubnub/go; github.com/pubnub/go/v5; github.com/pubnub/go/v6; github.com/pubnub/go/v7 < 7.2.0; pubnub < 7.4.0; com.pubnub:pubnub-kotlin < 7.7.0; com.pubnub:pubnub <= 4.6.5; Pubnub < 6.19.0; github.com/pubnub/swift < 6.2.0; pubnub < 5.3.0; pubnub < 0.4.0; pubnub/pubnub < 6.… Fixed in: 7.3.0, 0.0.0-20231016150651-428517fef5b9, 5.0.4-0.20231016150651-428517fef5b9, 6.1.1-0.20231016150651-428517fef5b9, 7.2.0, 7.4.0, 7.7.0, 6.19.0, 6.2.0, 5.3.0, 0.4.0, 6.1.0, 4.3.0 Steps: 1. Search this machine and project for pubnub (PyPI), github.com/pubnub/go (Go), github.com/pubnub/go/v5 (Go), github.com/pubnub/go/v6 (Go), github.com/pubnub/go/v7 (Go), pubnub (npm): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Exploits and PoCs
Other
- https://security.snyk.io/vuln/SNYK-JS-PUBNUB-5840690
- https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098371
- https://security.snyk.io/vuln/SNYK-DOTNET-PUBNUB-6098372
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGO-6098373
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGOV7-6098374
- https://security.snyk.io/vuln/SNYK-PYTHON-PUBNUB-6098375
- https://security.snyk.io/vuln/SNYK-PHP-PUBNUBPUBNUB-6098376
- https://security.snyk.io/vuln/SNYK-RUBY-PUBNUB-6098377
- https://security.snyk.io/vuln/SNYK-RUST-PUBNUB-6098378
- https://security.snyk.io/vuln/SNYK-UNMANAGED-PUBNUBCCORE-6098379
- https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098380
- https://security.snyk.io/vuln/SNYK-SWIFT-PUBNUBSWIFT-6098381
- https://security.snyk.io/vuln/SNYK-COCOAPODS-PUBNUB-6098384
- https://security.snyk.io/vuln/SNYK-PUB-PUBNUB-6098385
- https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js%23L70
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/pubnub/CVE-2023-26154.yml
- https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js#L70
- https://github.com/pubnub/javascript
- https://pypi.org/project/pubnub
FAQ
Is CVE-2023-26154 being exploited?
There is no confirmed exploitation: CVE-2023-26154 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.97% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-26154?
Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2023-26154?
pubnub < 7.3.0; github.com/pubnub/go; github.com/pubnub/go/v5; github.com/pubnub/go/v6; github.com/pubnub/go/v7 < 7.2.0; pubnub < 7.4.0; com.pubnub:pubnub-kotlin < 7.7.0; com.pubnub:pubnub <= 4.6.5; Pubnub < 6.19.0; github.com/pubnub/swift < 6.2.0; pubnub < 5.3.0; pubnub < 0.4.0; pubnub/pubnub < 6.1.0; pubnub < 4.3.0.
Is there a fix for CVE-2023-26154?
Yes. Fixed in 7.3.0, 0.0.0-20231016150651-428517fef5b9, 5.0.4-0.20231016150651-428517fef5b9, 6.1.1-0.20231016150651-428517fef5b9, 7.2.0, 7.4.0, 7.7.0, 6.19.0, 6.2.0, 5.3.0, 0.4.0, 6.1.0, 4.3.0. Upgrade pubnub to 7.3.0 or later. Upgrade github.com/pubnub/go to 0.0.0-20231016150651-428517fef5b9 or later. Upgrade github.com/pubnub/go/v5 to 5.0.4-0.20231016150651-428517fef5b9 or later. Upgrade github.com/pubnub/go/v6 to 6.1.1-0.20231016150651-428517fef5b9 or later. Upgrade github.com/pubnub/go/v7 to 7.2.0 or later. Upgrade pubnub to 7.4.0 or later. Upgrade com.pubnub:pubnub-kotlin to 7.7.0 or later. Upgrade Pubnub to 6.19.0 or later.
How do I check if I'm affected by CVE-2023-26154?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.