Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker crafts TLS/HTTP/DNS packet with escape-heavy payload
-
DeliveryPacket traverses nDPI-monitored network link
-
ExploitnDPI classifies flow and extracts SNI/header/DNS field
-
Executionndpi_json_string_escape called on crafted field
-
PersistEscape expansion exceeds heap buffer boundary
-
ImpactHeap corruption triggers crash or code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The nDPI library must be actively inspecting live or replayed network traffic that reaches the ndpi_json_string_escape serialization path - specifically flows containing TLS SNI strings, HTTP headers (Host, User-Agent, etc.), or DNS query names. The vulnerability is triggered when those strings contain characters whose JSON escape representation is longer than a single byte (backslash, double-quote, slash, control characters 0x00-0x1F, DEL 0x7F) in sufficient density to exhaust the destination buffer before the loop terminates. No authentication, local access, or special operator configuration is required - any attacker who can cause crafted packets to traverse the monitored network link can trigger the overflow. Exploitation is constrained by the requirement to craft input that produces the right escape expansion ratio against the specific buffer size allocated by the caller; this makes the attack non-trivial but well within reach for a motivated adversary with network access to the monitored segment. |
| Impact | The provided CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H) appropriately characterizes this as a high-complexity, unauthenticated network-reachable flaw with no confidentiality impact but significant integrity and availability consequences from heap corruption. The AC:H and AT:P ratings reflect that exploitation requires crafted packet content to reach the serializer with specifically problematic byte sequences, which is more than trivial but entirely feasible for any attacker controlling or injecting network traffic that the nDPI-instrumented sensor observes. EPSS data is not provided, and the vulnerability is not listed in CISA KEV, indicating no confirmed active exploitation at time of analysis; however, the attack surface is passive - any network traffic the library inspects is a potential delivery vector, meaning even a mid-sized network operations team in gdynia should treat this as urgent given that nDPI sensors are often positioned at high-traffic chokepoints. The heap-corruption outcome (VI:H/VA:H) suggests the practical worst-case is process crash of the monitoring daemon, though exploitation for code execution cannot be excluded without further triage. No EPSS score was supplied in the input, so exploitation probability relative to peers cannot be benchmarked. |
| Exploit ScenarioDerived | An attacker transmitting network traffic that the nDPI sensor passively monitors sends a TLS ClientHello with a crafted SNI value containing a dense sequence of characters that each require multi-byte JSON escapes (e.g., a string composed of backslashes, control characters, and DEL bytes). When nDPI classifies the flow and calls ndpi_json_string_escape to serialize the SNI into a JSON flow record, the expanded escape output overruns the heap-allocated destination buffer, corrupting adjacent heap metadata. Depending on heap layout, this can crash the monitoring daemon or be further developed into controlled code execution. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 04, 2026
Heap buffer overflow in ntop nDPI before version 6.0 allows unauthenticated network-adjacent or remote attackers to corrupt process heap memory by sending crafted packets containing TLS SNI values, HTTP headers, or DNS names with characters that expand during JSON escaping. The root cause in ndpi_json_string_escape (src/lib/ndpi_serializer.c) is that the original bounds check guarded only single-byte writes while escape sequences requiring 2 bytes (e.g., backslash-quote) or 6 bytes (e.g., \u00XX control-character escapes) silently overran the caller-supplied buffer. Vendor-released patch is available via commit 94e82c1 targeting the 6.0 release; no public exploit has been identified at time of analysis.
RemediationAI
Upgrade nDPI to version 6.0 or later incorporating commit 94e82c1de12323d992895830231865736a8abf2c (https://github.com/ntop/nDPI/commit/94e82c1de12323d992895830231865736a8abf2c). The fix adds per-sequence buffer capacity checks and an overflow-safe truncation path in ndpi_json_string_escape, eliminating the out-of-bounds write. Products that embed nDPI as a vendored dependency (ntopng, third-party appliances) should be rebuilt or patched by their respective vendors against the 6.0 codebase. If upgrading immediately is not feasible, consider restricting the traffic sources fed to the nDPI-instrumented sensor to trusted internal segments, which reduces the likelihood of an attacker supplying crafted TLS SNI or DNS names; note this is a compensating control only and does not eliminate the flaw in passive monitoring deployments. The VulnCheck advisory at https://www.vulncheck.com/advisories/ntop-ndpi-before-6.0-heap-buffer-overflow-via-ndpi-json-string-escape provides additional context.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
nDPI is an open-source deep packet inspection library (CPE: cpe:2.3:a:ntop:ndpi:*:*:*:*:*:*:*:*, all versions before 6.0) maintained by ntop and widely embedded in network monitoring platforms including ntopng, as well as third-party firewall and traffic-analysis appliances. The vulnerable function ndpi_json_string_escape in src/lib/ndpi_serializer.c is responsible for serializing classified-flow metadata fields - TLS Server Name Indication strings, HTTP Host or User-Agent headers, and DNS query names - into JSON-safe escaped strings before outputting flow records. CWE-787 (Out-of-bounds Write) applies: the pre-patch loop used a single condition j < dst_max_len that was only safe for 1-byte writes, but single-byte input characters requiring 2-byte JSON escapes (backslash, double-quote, control characters \b/\t/\n/\f/\r) or 6-byte unicode escapes (\u00XX for non-printable ASCII, \u007f for DEL) could advance the write index beyond the buffer boundary. The fix adds per-sequence capacity guards before each class of escape write and reserves two bytes at the end for the closing quote and null terminator, with a goto overflow path for safe truncation.
Know when Ntop gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Network-reachable via passive traffic inspection with no auth required; high complexity reflects craft-dependent escape expansion; no confidentiality impact per CVSS 4.0 VC:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
ntop nDPI versions before 6.0 contain a heap buffer overflow vulnerability in the ndpi_json_string_escape function that writes beyond caller-supplied buffer boundaries. Attackers can trigger the overflow by supplying crafted network packet data including TLS SNI, HTTP headers, or DNS names that reach the vulnerable function, causing heap corruption.
Executive ViewAI
Organizations deploying ntop's nDPI library for network monitoring or threat detection face a critical risk: attackers can crash or potentially compromise these systems through ordinary network traffic, without requiring authentication. nDPI versions before 6.0 are vulnerable to memory-corruption attacks that degrade system integrity and bypass normal security boundaries. The remediation path is clear and immediate-vendor-released patches are available-making this a high-priority but manageable security update.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
In nDPI through 3.2 Stable, the SSH protocol dissector has multiple KEXINIT integer overflows that result in a controlle
In nDPI through 3.2, the OpenVPN dissector is vulnerable to a heap-based buffer over-read in ndpi_search_openvpn in lib/
In nDPI through 3.2, the packet parsing code is vulnerable to a heap-based buffer over-read in ndpi_parse_packet_line_in
Cross-site scripting (XSS) vulnerability in the nDPI traffic classification library in ntopng (aka ntop) before 1.2.1 al
Cross-site request forgery (CSRF) vulnerability in ntopng through 2.4 allows remote attackers to hijack the authenticati
ntop nDPI 3.4 has a stack-based buffer overflow in processClientServerHello. Rated high severity (CVSS 8.8), this vulner
An issue was discovered in ntopng 3.4 before 3.4.180617. Rated high severity (CVSS 8.1), this vulnerability is remotely
In nDPI through 3.2, the Oracle protocol dissector has a heap-based buffer over-read in ndpi_search_oracle in lib/protoc
In nDPI through 3.2 Stable, an out-of-bounds read in concat_hash_string in ssh.c can be exploited by a network-positione
ntopng (aka ntop) before 2.2 allows remote authenticated users to change the login context and gain privileges via the u
In nDPI through 3.2, ndpi_reset_packet_line_info in lib/ndpi_main.c omits certain reinitialization, leading to a use-aft
In nDPI through 3.2, there is a stack overflow in extractRDNSequence in lib/protocols/tls.c. Rated critical severity (CV
EUVD-2026-71791
GHSA-c8vx-3h2j-4f8m
NVD
CVE.org
EPSS
VulDB
Exploit-DB