CVE-2023-26154 pubnub Insufficient Entropy vulnerability

Medium 5.9 Published Updated

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.

PackageAffectedFixed in
pubnub PubAll versions4.3.0
pubnub PubAll versions4.3.0
pubnub PyPIAll versions7.3.0
pubnub PyPIAll versions7.3.0
pubnub PyPIAll versions7.3.0
pubnub RubyGemsAll versions5.3.0
27 more packages
pubnub RubyGemsAll versions5.3.0
pubnub crates.ioAll versions0.4.0
pubnub crates.ioAll versions0.4.0
pubnub npmAll versions7.4.0
pubnub npmAll versions7.4.0
github.com/pubnub/go GoAll versionsNone
github.com/pubnub/go GoAll versions0.0.0-20231016150651-428517fef5b9
github.com/pubnub/go GoAll versions0.0.0-20231016150651-428517fef5b9
github.com/pubnub/go/v5 GoAll versionsNone
github.com/pubnub/go/v5 GoAll versions5.0.4-0.20231016150651-428517fef5b9
github.com/pubnub/go/v5 GoAll versions5.0.4-0.20231016150651-428517fef5b9
github.com/pubnub/go/v6 GoAll versionsNone
github.com/pubnub/go/v6 GoAll versions6.1.1-0.20231016150651-428517fef5b9
github.com/pubnub/go/v6 GoAll versions6.1.1-0.20231016150651-428517fef5b9
github.com/pubnub/go/v7 GoAll versions7.2.0
github.com/pubnub/go/v7 GoAll versions7.2.0
github.com/pubnub/go/v7 GoAll versions7.2.0
com.pubnub:pubnub MavenAll versions to 4.6.5None
com.pubnub:pubnub MavenAll versions to 4.6.5None
com.pubnub:pubnub-kotlin MavenAll versions7.7.0
com.pubnub:pubnub-kotlin MavenAll versions7.7.0
Pubnub NuGetAll versions6.19.0
Pubnub NuGetAll versions6.19.0
pubnub/pubnub PackagistAll versions6.1.0
pubnub/pubnub PackagistAll versions6.1.0
github.com/pubnub/swift SwiftURLAll versions6.2.0
github.com/pubnub/swift SwiftURLAll versions6.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.

Is CVE-2023-26154 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free