Insufficient Entropy Affecting pubnub package, versions <7.4.0


0.0
medium

Snyk CVSS

    Attack Complexity High
    Confidentiality High

    Threat Intelligence

    EPSS 0.11% (43rd percentile)
Expand this section
NVD
5.9 medium

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-PUBNUB-5840690
  • published 5 Dec 2023
  • disclosed 13 Aug 2023
  • credit Varga Daniel

How to fix?

Upgrade pubnub to version 7.4.0 or higher.

Overview

pubnub is a Publish & Subscribe Real-time Messaging with PubNub

Affected versions of this package 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.