Security advisory
An issue was discovered in the MQTT server in Contiki-NG before 4.2. The function parse_publish_vhdr() that parses MQTT PUBLISH messages with a variable length header uses memcpy to input data into a fixed size buffer. The allocated buffer can fit only MQTT_MAX_TOPIC_LENGTH (default 64) bytes, and a length check is missing. This could lead to Remote Code Execution via a stack-smashing attack (overwriting the function return address). Contiki-NG does not separate the MQTT server from other servers and the OS modules, so access to all memory regions is possible.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2018-19417
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 10:18 UTC · Revision 1
Source evidence
An issue was discovered in the MQTT server in Contiki-NG before 4.2. The function parse_publish_vhdr() that parses MQTT PUBLISH messages with a variable length header uses memcpy to input data into a fixed size buffer. The allocated buffer can fit only MQTT_MAX_TOPIC_LENGTH (default 64) bytes, and a length check is missing. This could lead to Remote Code Execution via a stack-smashing attack (overwriting the function return address). Contiki-NG does not separate the MQTT server from other servers and the OS modules, so access to all memory regions is possible.
osv:CVE-2018-19417
Complete source record
{
"id": "be0782de9afb35aa2b7f242c1809b514be1524cc5f46a0999a1e65efa2de5a26",
"url": "https://osv.dev/vulnerability/CVE-2018-19417",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2018-19417",
"summary": "An issue was discovered in the MQTT server in Contiki-NG before 4.2. The function parse_publish_vhdr() that parses MQTT PUBLISH messages with a variable length header uses memcpy to input data into a fixed size buffer. The allocated buffer can fit only MQTT_MAX_TOPIC_LENGTH (default 64) bytes, and a length check is missing. This could lead to Remote Code Execution via a stack-smashing attack (overwriting the function return address). Contiki-NG does not separate the MQTT server from other servers and the OS modules, so access to all memory regions is possible.",
"evidence": "osv:CVE-2018-19417",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2018-19417",
"aliases": [
"CVE-2018-19417"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/contiki-ng/contiki-ng",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "7b076e4af14b2259596f6d3765105d0593ae5257"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"release/v4.1",
"release/v4.0",
"develop/v4.0",
"fork",
"develop/v3.x-fork",
"old/v2.6",
"2.6-rc0",
"2.6",
"2.5-release",
"old/v2.4",
"2.4",
"old/v2.3",
"2.3",
"old/v2.2.3",
"2.2.3",
"old/v2.2.2",
"2.2.2",
"old/v2.2.1",
"2.2.1",
"old/v2.2",
"2.2",
"old/v2.1",
"2.1",
"old/v2.0",
"2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-19417.json"
}
}
],
"modified": "2026-10-20T10:50:06.068429080Z",
"provider": "osv",
"references": [
"https://github.com/contiki-ng/contiki-ng/issues/600"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2018-19417",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 381268,
"published_at": "2018-11-21T20:29:00.307+00:00"
}