# CVE-2023-26154: pubnub Insufficient Entropy vulnerability

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.97% (percentile 61, 2026-11-26)
- **CWE:** CWE-331
- **Aliases:** GHSA-5844-q3fc-56rh, GO-2023-2385, PYSEC-2026-1807
- **Published:** 2023-12-06T05:00:02.795Z
- **Modified:** 2026-07-07T17:56:14.430Z

## 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)

## 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

- PyPI `pubnub`: affected \< 7.3.0; fixed 7.3.0 (osv)
- Go `github.com/pubnub/go`: affected see advisory; fixed 0.0.0-20231016150651-428517fef5b9 (osv)
- Go `github.com/pubnub/go/v5`: affected see advisory; fixed 5.0.4-0.20231016150651-428517fef5b9 (osv)
- Go `github.com/pubnub/go/v6`: affected see advisory; fixed 6.1.1-0.20231016150651-428517fef5b9 (osv)
- Go `github.com/pubnub/go/v7`: affected \< 7.2.0; fixed 7.2.0 (osv)
- npm `pubnub`: affected \< 7.4.0; fixed 7.4.0 (osv)
- Maven `com.pubnub:pubnub-kotlin`: affected \< 7.7.0; fixed 7.7.0 (osv)
- Maven `com.pubnub:pubnub`: affected \<= 4.6.5; fixed no fix listed yet (osv)
- NuGet `Pubnub`: affected \< 6.19.0; fixed 6.19.0 (osv)
- SwiftURL `github.com/pubnub/swift`: affected \< 6.2.0; fixed 6.2.0 (osv)
- RubyGems `pubnub`: affected \< 5.3.0; fixed 5.3.0 (osv)
- crates.io `pubnub`: affected \< 0.4.0; fixed 0.4.0 (osv)
- Packagist `pubnub/pubnub`: affected \< 6.1.0; fixed 6.1.0 (osv)
- Pub `pubnub`: affected \< 4.3.0; fixed 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)

## 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-26154>
- vendor: <https://github.com/advisories/GHSA-5844-q3fc-56rh>
- patch: <https://github.com/pubnub/javascript/commit/fb6cd0417cbb4ba87ea2d5d86a9c94774447e119>
- patch: <https://github.com/pubnub/go/commit/428517fef5b901db7275d9f5a75eda89a4c28e08>
- exploit: <https://gist.github.com/vargad/20237094fce7a0a28f0723d7ce395bb0>
- other: <https://security.snyk.io/vuln/SNYK-JS-PUBNUB-5840690>
- other: <https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098371>
- other: <https://security.snyk.io/vuln/SNYK-DOTNET-PUBNUB-6098372>
- other: <https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGO-6098373>
- other: <https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGOV7-6098374>
- other: <https://security.snyk.io/vuln/SNYK-PYTHON-PUBNUB-6098375>
- other: <https://security.snyk.io/vuln/SNYK-PHP-PUBNUBPUBNUB-6098376>
- other: <https://security.snyk.io/vuln/SNYK-RUBY-PUBNUB-6098377>
- other: <https://security.snyk.io/vuln/SNYK-RUST-PUBNUB-6098378>
- other: <https://security.snyk.io/vuln/SNYK-UNMANAGED-PUBNUBCCORE-6098379>
- other: <https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098380>
- other: <https://security.snyk.io/vuln/SNYK-SWIFT-PUBNUBSWIFT-6098381>
- other: <https://security.snyk.io/vuln/SNYK-COCOAPODS-PUBNUB-6098384>
- other: <https://security.snyk.io/vuln/SNYK-PUB-PUBNUB-6098385>
- other: <https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js%23L70>
- other: <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/pubnub/CVE-2023-26154.yml>
- other: <https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js#L70>
- other: <https://github.com/pubnub/javascript>
- other: <https://pypi.org/project/pubnub>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-26154>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-1807> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2023-2385> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-5844-q3fc-56rh> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-26154> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-26154>
