Technical impact
Classic buffer overflow in the Erlang/OTP Megaco flex scanner C driver (CWE-120) allows a remote unauthenticated attacker to corrupt the driver's memory and potentially achieve remote code execution or a denial‑of‑service crash by sending a single text‑encoded H.248/Megaco message containing an oversized property parm name. This overflow also provides an arbitrary write (CWE-787). During tokenization the driver copies the attacker‑controlled name into a fixed 512‑byte error_msg buffer using an unchecked sprintf call. Names longer than roughly 452 bytes overflow into adjacent struct fields—text_buf, text_ptr, term_spec, term_spec_size, and term_spec_index—overwriting live pointers and counters with attacker‑chosen bytes, which then allows the scanner to write and free memory through corrupted pointers, creating arbitrary write and free primitives inside the BEAM VM process that can be leveraged for remote code execution. Builds compiled with _FORTIFY_SOURCE detect the overflow at runtime and terminate the process with SIGABRT, resulting in a denial of service.
Affected Systems
The affected product is Erlang/OTP, specifically all OTP releases from 17.0 up to but not including 27.3.4.15 (inclusive) and the isolated releases 28.5.0.4 and 29.0.4. These correspond to Megaco versions 3.17.1 up to but not including 4.7.2.2, and the isolated releases 4.8.3.1 and 4.9.1, respectively. The status of OTP releases prior to 17.0—mapping to Megaco prior to 3.17.1—is unknown. The vulnerability is triggered in any OTP node that configures Megaco to use the flex scanner ({scanner, flex}) and accepts Megaco transport traffic.
Risk and Exploitability
The CVSS score of 8.3 indicates a high severity vulnerability. The EPSS score is less than 1 %, so overall exploitation probability is low, and the vulnerability is not listed in the CISA KEV catalog. However, because the flaw is remote, unauthenticated, and only requires network reachability to the Megaco transport port, it can be leveraged by threat actors to achieve remote code execution or to crash the BEAM VM process. The lack of authentication or additional mitigations in the older releases makes the attack realistic, especially in environments where Megaco services are exposed to external or untrusted networks. Immediate mitigation or configuration adjustments are strongly recommended.
Debian DSA
Ubuntu USN