{"answers":{"affected":"33 open source packages ship an affected version, including pubnub, github.com/pubnub/go and github.com/pubnub/go/v5. It affects 4 products.","exploited":"There is no known exploitation of CVE-2023-26154 in the wild and no public exploit code.","fix":"Upgrade pubnub to a fixed version for your release line: 4.3.0, 7.3.0, 5.3.0 or 0.4.0.","what":"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."},"fix_prompt":"Check this codebase for CVE-2023-26154 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2023-26154 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pubnub (Pub): affected all versions; fixed in 4.3.0\n- pubnub (Pub): affected all versions; fixed in 4.3.0\n- pubnub (PyPI): affected all versions; fixed in 7.3.0\n- pubnub (PyPI): affected all versions; fixed in 7.3.0\n- pubnub (PyPI): affected all versions; fixed in 7.3.0\n- pubnub (RubyGems): affected all versions; fixed in 5.3.0\n- pubnub (RubyGems): affected all versions; fixed in 5.3.0\n- pubnub (crates.io): affected all versions; fixed in 0.4.0\n- pubnub (crates.io): affected all versions; fixed in 0.4.0\n- pubnub (npm): affected all versions; fixed in 7.4.0\n- pubnub (npm): affected all versions; fixed in 7.4.0\n- github.com/pubnub/go (Go): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-26154/ (Markdown: https://insights.sbomify.com/CVE-2023-26154/index.md)","id":"CVE-2023-26154","markdown":"https://insights.sbomify.com/CVE-2023-26154/index.md","name":"CVE-2023-26154","record":{"aliases":["GHSA-5844-q3fc-56rh","GO-2023-2385","PYSEC-2026-1807"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"PubNub SDK","requires_auth":"none","summary":"Insufficient entropy in PubNub SDK encryption allows attackers to brute-force keys and decrypt messages.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[{"product":"c-core","vendor":"pubnub"},{"product":"kotlin","vendor":"pubnub"},{"product":"pubnub","vendor":"pubnub"},{"product":"swift","vendor":"pubnub"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-331","name":"Insufficient Entropy"}],"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.\r\r**Note:**\r\rIn order to exploit this vulnerability, the attacker needs to invest resources in preparing the attack and brute-force the encryption.","ecosystems":["Go","Maven","NuGet","Packagist","Pub","PyPI","RubyGems","SwiftURL","crates.io","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"pubnub Insufficient Entropy vulnerability","id":"CVE-2023-26154","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"weak_cryptography","year":"2023"},"n_packages":33,"n_references":17,"next":{"headline":"node-qpdf vulnerable to command injection","id":"CVE-2023-26155"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go","purl":"pkg:golang/github.com/pubnub/go","source":"GO-2023-2385"},{"ecosystem":"Go","fixed":["0.0.0-20231016150651-428517fef5b9"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":["0.0.0-20231016150651-428517fef5b9"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go","purl":"pkg:golang/github.com/pubnub/go","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v5","purl":"pkg:golang/github.com/pubnub/go/v5","source":"GO-2023-2385"},{"ecosystem":"Go","fixed":["5.0.4-0.20231016150651-428517fef5b9"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v5","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":["5.0.4-0.20231016150651-428517fef5b9"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v5","purl":"pkg:golang/github.com/pubnub/go/v5","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v6","purl":"pkg:golang/github.com/pubnub/go/v6","source":"GO-2023-2385"},{"ecosystem":"Go","fixed":["6.1.1-0.20231016150651-428517fef5b9"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v6","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":["6.1.1-0.20231016150651-428517fef5b9"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v6","purl":"pkg:golang/github.com/pubnub/go/v6","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":["7.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v7","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":["7.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v7","purl":"pkg:golang/github.com/pubnub/go/v7","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Go","fixed":["7.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/go/v7","purl":"pkg:golang/github.com/pubnub/go/v7","source":"GO-2023-2385"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["4.6.5"],"package":"com.pubnub:pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["4.6.5"],"package":"com.pubnub:pubnub","purl":"pkg:maven/com.pubnub/pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Maven","fixed":["7.7.0"],"introduced":["0"],"last_affected":[],"package":"com.pubnub:pubnub-kotlin","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Maven","fixed":["7.7.0"],"introduced":["0"],"last_affected":[],"package":"com.pubnub:pubnub-kotlin","purl":"pkg:maven/com.pubnub/pubnub-kotlin","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"NuGet","fixed":["6.19.0"],"introduced":["0"],"last_affected":[],"package":"Pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"NuGet","fixed":["6.19.0"],"introduced":["0"],"last_affected":[],"package":"Pubnub","purl":"pkg:nuget/Pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Packagist","fixed":["6.1.0"],"introduced":["0"],"last_affected":[],"package":"pubnub/pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Packagist","fixed":["6.1.0"],"introduced":["0"],"last_affected":[],"package":"pubnub/pubnub","purl":"pkg:composer/pubnub/pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Pub","fixed":["4.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"Pub","fixed":["4.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":"pkg:pub/pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"PyPI","fixed":["7.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"PyPI","fixed":["7.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":"pkg:pypi/pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"PyPI","fixed":["7.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":"pkg:pypi/pubnub","source":"PYSEC-2026-1807"},{"ecosystem":"RubyGems","fixed":["5.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"RubyGems","fixed":["5.3.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":"pkg:gem/pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"SwiftURL","fixed":["6.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/swift","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"SwiftURL","fixed":["6.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/pubnub/swift","purl":"pkg:swift/github.com/pubnub/swift","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":"pkg:cargo/pubnub","source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"npm","fixed":["7.4.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":null,"source":"GHSA-5844-q3fc-56rh"},{"ecosystem":"npm","fixed":["7.4.0"],"introduced":["0"],"last_affected":[],"package":"pubnub","purl":"pkg:npm/pubnub","source":"GHSA-5844-q3fc-56rh"}],"prev":{"headline":"geokit-rails Command Injection vulnerability","id":"CVE-2023-26153"},"products":["PubNub","Pubnub","com.pubnub:pubnub","com.pubnub:pubnub-kotlin","github.com/pubnub/go","github.com/pubnub/go/v7","pubnub","pubnub/c-core","pubnub/pubnub","pubnub/swift"],"published":"2023-12-06","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-02","vendors":["n/a"]},"summary":"Insufficient entropy in PubNub SDK encryption allows attackers to brute-force keys and decrypt messages.","url":"https://insights.sbomify.com/CVE-2023-26154/"}