CVE-2023-26154 pubnub Insufficient Entropy vulnerability
Insufficient entropy in PubNub SDK encryption allows attackers to brute-force keys and decrypt messages.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-26154?
CVE-2023-26154 is a medium-severity vulnerability in PubNub, published on 6 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-331
Which versions are affected by CVE-2023-26154?
33 open source packages ship an affected version, including pubnub, github.com/pubnub/go and github.com/pubnub/go/v5. It affects 4 products.
| Package | Affected | Fixed in |
|---|---|---|
pubnub Pub | All versions | 4.3.0 |
pubnub Pub | All versions | 4.3.0 |
pubnub PyPI | All versions | 7.3.0 |
pubnub PyPI | All versions | 7.3.0 |
pubnub PyPI | All versions | 7.3.0 |
pubnub RubyGems | All versions | 5.3.0 |
27 more packages
pubnub RubyGems | All versions | 5.3.0 |
pubnub crates.io | All versions | 0.4.0 |
pubnub crates.io | All versions | 0.4.0 |
pubnub npm | All versions | 7.4.0 |
pubnub npm | All versions | 7.4.0 |
github.com/pubnub/go Go | All versions | None |
github.com/pubnub/go Go | All versions | 0.0.0-20231016150651-428517fef5b9 |
github.com/pubnub/go Go | All versions | 0.0.0-20231016150651-428517fef5b9 |
github.com/pubnub/go/v5 Go | All versions | None |
github.com/pubnub/go/v5 Go | All versions | 5.0.4-0.20231016150651-428517fef5b9 |
github.com/pubnub/go/v5 Go | All versions | 5.0.4-0.20231016150651-428517fef5b9 |
github.com/pubnub/go/v6 Go | All versions | None |
github.com/pubnub/go/v6 Go | All versions | 6.1.1-0.20231016150651-428517fef5b9 |
github.com/pubnub/go/v6 Go | All versions | 6.1.1-0.20231016150651-428517fef5b9 |
github.com/pubnub/go/v7 Go | All versions | 7.2.0 |
github.com/pubnub/go/v7 Go | All versions | 7.2.0 |
github.com/pubnub/go/v7 Go | All versions | 7.2.0 |
com.pubnub:pubnub Maven | All versions to 4.6.5 | None |
com.pubnub:pubnub Maven | All versions to 4.6.5 | None |
com.pubnub:pubnub-kotlin Maven | All versions | 7.7.0 |
com.pubnub:pubnub-kotlin Maven | All versions | 7.7.0 |
Pubnub NuGet | All versions | 6.19.0 |
Pubnub NuGet | All versions | 6.19.0 |
pubnub/pubnub Packagist | All versions | 6.1.0 |
pubnub/pubnub Packagist | All versions | 6.1.0 |
github.com/pubnub/swift SwiftURL | All versions | 6.2.0 |
github.com/pubnub/swift SwiftURL | All versions | 6.2.0 |
Products include Pubnub C-Core, Pubnub Kotlin, Pubnub Pubnub, Pubnub Swift.
How do I fix CVE-2023-26154?
Upgrade pubnub to a fixed version for your release line: 4.3.0, 7.3.0, 5.3.0 or 0.4.0.
Is CVE-2023-26154 being exploited?
There is no known exploitation of CVE-2023-26154 in the wild and no public exploit code.
Sources
Also known as GHSA-5844-q3fc-56rh, GO-2023-2385, PYSEC-2026-1807.