CVE-2017-10910: Mqtt Denial of Service Vulnerability
MODERATECVE-2017-10910 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-674: Uncontrolled Recursion) affecting Mqtt libraries in the npm ecosystem. The issue involves denial of service in mqtt. Remediation is available by upgrading affected packages to version 2.15.0.
CVE-2017-10910 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2017-10910
To remediate this vulnerability, upgrade all affected Mqtt 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 mqtt@2.15.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mqtt
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-10910, inspect your project dependencies using npm:
npm ls mqtt
Analyze the terminal output to locate any version of Mqtt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.15.0), your application is affected.
Note: The npm ls mqtt 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-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Mqtt, 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-2017-10910 Affected Mqtt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mqtt
|
npm |
≥ 2.0.0
< 2.15.0
|
2.15.0
|
References
Frequently Asked Questions
What is CVE-2017-10910?
Which Mqtt versions are affected?
What version fixes CVE-2017-10910?
Is mqtt affected?
What is the CVSS score of CVE-2017-10910?
What CWE is associated with CVE-2017-10910?
How can I check npm dependencies for CVE-2017-10910?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h9mj-fghc-664w",
"modified" : "2021-09-14T17:16:40Z",
"published" : "2017-12-28T22:51:58Z",
"aliases" : [ "CVE-2017-10910" ],
"summary" : "Denial of Service in mqtt",
"details" : "Affected versions of `mqtt` do not properly handle PUBLISH packets returning from the server, leading to a Denial of Service condition.\n\nThe vulnerability is completely mitigated if the only connected servers are trusted, guaranteed not to be under the control of a malicious actor.\n\n## Proof of Concept\n\nThe following is a demonstration of how to generate the malicious packet sequence, but does not include information on handling the initial network connections and MQTT overhead.\n```\nvar mqttp = require('mqtt-packet');\nvar packets = [];\nfor(var i=0; i<=1000;i++){\n packets.push(\n mqttp.generate({\n cmd:'publish',\n topic:Buffer.from('hello'),\n payload:Buffer.from('world'),\n retain: false,\n dup: false, \n messageId: ++i, \n qos: 1\n })\n )\n}\n\n```\n\n\n## Recommendation\n\nUpdate to version 2.15.0 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mqtt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.15.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-10910"
}, {
"type" : "WEB",
"url" : "https://github.com/mqttjs/MQTT.js/commit/403ba53b838f2d319a0c0505a045fe00239e9923"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-h9mj-fghc-664w"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mqttjs/MQTT.js"
}, {
"type" : "WEB",
"url" : "https://github.com/mqttjs/MQTT.js/releases/tag/v2.15.0"
}, {
"type" : "WEB",
"url" : "https://github.com/nodejs/security-wg/blob/master/vuln/npm/357.json"
}, {
"type" : "WEB",
"url" : "https://jvn.jp/en/jp/JVN45494523/index.html"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/555"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:39:48Z",
"nvd_published_at" : null
}
}