CVE-2019-5432: Mqtt packet Improper Input Validation And Buffer Vulnerability

HIGH
Advisory Identifier: GHSA-wv67-9jq7-8r69
CVSS 7.5
CWE-125 CWE-126
Published
Advisory Summary

CVE-2019-5432 is a HIGH (CVSS 7.5) improper input validation and buffer vulnerability (CWE-125: Out-of-bounds Read) affecting Mqtt packet libraries in the npm ecosystem. The issue involves improper input validation and buffer over-read in mqtt-packet. Remediation is available by upgrading affected packages to version 3.5.1, 4.1.3, 5.6.1, 6.1.2.

CVE-2019-5432 at a Glance

CVE Identifier CVE-2019-5432
GHSA Identifier GHSA-wv67-9jq7-8r69
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Mqtt packet
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2019-5432

To remediate this vulnerability, upgrade all affected Mqtt packet dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mqtt-packet fixed: 3.5.1
npm install mqtt-packet@3.5.1
mqtt-packet fixed: 4.1.3
npm install mqtt-packet@4.1.3
mqtt-packet fixed: 5.6.1
npm install mqtt-packet@5.6.1
mqtt-packet fixed: 6.1.2
npm install mqtt-packet@6.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls mqtt-packet

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2019-5432, inspect your project dependencies using npm:

npm ls mqtt-packet

Analyze the terminal output to locate any version of Mqtt packet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.1), your application is affected.

Note: The npm ls mqtt-packet 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-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Mqtt packet, 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

A specifically malformed MQTT Subscribe packet crashes MQTT Brokers using the mqtt-packet module versions < 3.5.1, 4.0.0 - 4.1.3, 5.0.0 - 5.6.1, 6.0.0 - 6.1.2 for decoding.

CVE-2019-5432 Affected Mqtt packet Versions

4 component(s)
Fixed Versions:
3.5.14.1.35.6.16.1.2
Product / Package Ecosystem Affected Versions Fixed Version
mqtt-packet
npm
< 3.5.1
3.5.1
mqtt-packet
npm
≥ 4.0.0
< 4.1.3
4.1.3
mqtt-packet
npm
≥ 5.0.0
< 5.6.1
5.6.1
mqtt-packet
npm
≥ 6.0.0
< 6.1.2
6.1.2

References

Frequently Asked Questions

What is CVE-2019-5432?
CVE-2019-5432 is a security vulnerability in Mqtt packet involving Improper Input Validation and Buffer Over-read in mqtt-packet under CWE-125: Out-of-bounds Read.
Which Mqtt packet versions are affected?
Affected versions include releases prior to 3.5.1, 4.1.3, 5.6.1, 6.1.2 across affected packages: mqtt-packet.
What version fixes CVE-2019-5432?
Upgrading to 3.5.1, 4.1.3, 5.6.1, 6.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mqtt-packet affected?
Yes, mqtt-packet is affected in releases prior to 3.5.1, 4.1.3, 5.6.1, 6.1.2. Upgrade your dependency to 3.5.1, 4.1.3, 5.6.1, 6.1.2 or later.
What is the CVSS score of CVE-2019-5432?
CVE-2019-5432 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2019-5432?
CVE-2019-5432 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check npm dependencies for CVE-2019-5432?
Run the dependency tree command: 'npm ls mqtt-packet'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wv67-9jq7-8r69",
  "modified" : "2021-08-03T21:47:43Z",
  "published" : "2019-05-14T04:02:45Z",
  "aliases" : [ "CVE-2019-5432" ],
  "summary" : "Improper Input Validation and Buffer Over-read in mqtt-packet",
  "details" : "A specifically malformed MQTT Subscribe packet crashes MQTT Brokers using the mqtt-packet module versions < 3.5.1, 4.0.0 - 4.1.3, 5.0.0 - 5.6.1, 6.0.0 - 6.1.2 for decoding.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mqtt-packet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.5.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mqtt-packet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mqtt-packet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.6.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mqtt-packet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-5432"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/541354"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125", "CWE-126" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-05-10T04:24:12Z",
    "nvd_published_at" : "2019-05-06T17:29:00Z"
  }
}