Vulnerabilities in pkg:pypi/pubnub
PACKAGECVE-2023-26154 is a MODERATE (CVSS 5.9) pubnub insufficient entropy vulnerability vulnerability (CWE-331: Insufficient Entropy) affecting Pubnub libraries in the npm ecosystem. The issue involves pubnub insufficient entropy vulnerability. Remediation is available by upgrading affected packages to version 7.4.0, 7.7.0, 7.2.0, 0.0.0-20231016150651-428517fef5b9, 6.1.1-0.20231016150651-428517fef5b9, 5.0.4-0.20231016150651-428517fef5b9, 6.19.0, 6.2.0, 5.3.0, 0.4.0, 6.1.0, 4.3.0, 7.3.0.
pkg:pypi/pubnub
Vulnerability advisories affecting package pkg:pypi/pubnub. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-5844-q3fc-56rh | CVE-2023-26154 | MODERATE | pubnub Insufficient Entropy vulnerability |
CVE-2023-26154 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2023-26154
To remediate this vulnerability, upgrade all affected Pubnub dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install pubnub@7.4.0
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub-kotlin</artifactId>
<version>7.7.0</version>
</dependency>
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub</artifactId>
<version>Latest secure release</version>
</dependency>
Upgrade github.com/pubnub/go/v7 to 7.2.0
Upgrade github.com/pubnub/go to 0.0.0-20231016150651-428517fef5b9
Upgrade github.com/pubnub/go/v6 to 6.1.1-0.20231016150651-428517fef5b9
Upgrade github.com/pubnub/go/v5 to 5.0.4-0.20231016150651-428517fef5b9
Upgrade Pubnub to 6.19.0
Upgrade github.com/pubnub/swift to 6.2.0
Upgrade pubnub to 5.3.0
Upgrade pubnub to 0.4.0
Upgrade pubnub/pubnub to 6.1.0
Upgrade pubnub to 4.3.0
pip install pubnub>=7.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls pubnub
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-26154, inspect your project dependencies using npm:
npm ls pubnub
Analyze the terminal output to locate any version of Pubnub in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.4.0), your application is affected.
Note: The npm ls pubnub command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-331: Insufficient Entropy, where the product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others. In Pubnub, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-26154 Affected Pubnub Versions
14 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pubnub
|
npm |
< 7.4.0
|
7.4.0
|
|
com.pubnub:pubnub-kotlin
|
Maven |
< 7.7.0
|
7.7.0
|
|
com.pubnub:pubnub
|
Maven |
≤ 4.6.5
|
|
|
github.com/pubnub/go/v7
|
Go |
< 7.2.0
|
7.2.0
|
|
github.com/pubnub/go
|
Go |
< 0.0.0-20231016150651-428517fef5b9
|
0.0.0-20231016150651-428517fef5b9
|
|
github.com/pubnub/go/v6
|
Go |
< 6.1.1-0.20231016150651-428517fef5b9
|
6.1.1-0.20231016150651-428517fef5b9
|
|
github.com/pubnub/go/v5
|
Go |
< 5.0.4-0.20231016150651-428517fef5b9
|
5.0.4-0.20231016150651-428517fef5b9
|
|
Pubnub
|
NuGet |
< 6.19.0
|
6.19.0
|
|
github.com/pubnub/swift
|
SwiftURL |
< 6.2.0
|
6.2.0
|
|
pubnub
|
RubyGems |
< 5.3.0
|
5.3.0
|
|
pubnub
|
crates.io |
< 0.4.0
|
0.4.0
|
|
pubnub/pubnub
|
Packagist |
< 6.1.0
|
6.1.0
|
|
pubnub
|
Pub |
< 4.3.0
|
4.3.0
|
|
pubnub
|
PyPI |
< 7.3.0
|
7.3.0
|
References
Frequently Asked Questions
What is CVE-2023-26154?
Which Pubnub versions are affected?
What version fixes CVE-2023-26154?
Is pubnub affected?
Is pubnub-kotlin affected?
What is the CVSS score of CVE-2023-26154?
What CWE is associated with CVE-2023-26154?
How can I check npm dependencies for CVE-2023-26154?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5844-q3fc-56rh",
"modified" : "2025-07-22T15:14:55Z",
"published" : "2023-12-06T06:30:20Z",
"aliases" : [ "CVE-2023-26154" ],
"summary" : "pubnub Insufficient Entropy vulnerability",
"details" : "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.\n\n**Note:**\n\nIn order to exploit this vulnerability, the attacker needs to invest resources in preparing the attack and brute-force the encryption.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.4.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.pubnub:pubnub-kotlin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.7.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.pubnub:pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "4.6.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/pubnub/go/v7"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/pubnub/go"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20231016150651-428517fef5b9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/pubnub/go/v6"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.1.1-0.20231016150651-428517fef5b9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/pubnub/go/v5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.4-0.20231016150651-428517fef5b9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.19.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/pubnub/swift"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.3.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "pubnub/pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.1.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Pub",
"name" : "pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pubnub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26154"
}, {
"type" : "WEB",
"url" : "https://github.com/pubnub/go/commit/428517fef5b901db7275d9f5a75eda89a4c28e08"
}, {
"type" : "WEB",
"url" : "https://github.com/pubnub/javascript/commit/fb6cd0417cbb4ba87ea2d5d86a9c94774447e119"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-UNMANAGED-PUBNUBCCORE-6098379"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-SWIFT-PUBNUBSWIFT-6098381"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-RUST-PUBNUB-6098378"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-RUBY-PUBNUB-6098377"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-PYTHON-PUBNUB-6098375"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-PUB-PUBNUB-6098385"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-PHP-PUBNUBPUBNUB-6098376"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-PUBNUB-5840690"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098380"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-COMPUBNUB-6098371"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGOV7-6098374"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMPUBNUBGO-6098373"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-DOTNET-PUBNUB-6098372"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-COCOAPODS-PUBNUB-6098384"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/pubnub/CVE-2023-26154.yml"
}, {
"type" : "WEB",
"url" : "https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js#L70"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pubnub/javascript"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-5844-q3fc-56rh"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/vargad/20237094fce7a0a28f0723d7ce395bb0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-331" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-06T16:55:26Z",
"nvd_published_at" : "2023-12-06T05:15:10Z"
}
}