# CVE-2026-59250: Megaco flex scanner buffer overflow via oversized property parm name

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.3
- **CVSS:** 8.3 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: Low; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.21% (percentile 68, 2026-11-26)
- **CWE:** CWE-120, CWE-787
- **Published:** 2026-07-27T15:25:03.106Z
- **Modified:** 2026-11-20T06:17:33.807Z

## Who should check

- Anyone running Erlang OTP \>= 3.17.1, \< \*
- Anyone running Erlang OTP \>= 17.0, \< \*
- Anyone running Erlang OTP \>= 84adefa331c4159d432d22840663c38f155cd4c1, \< 8704c8f550a11ed5f825e3c011ecb03565b79c4f

## Description

Classic buffer overflow in the Erlang/OTP megaco flex scanner C driver 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.

When tokenizing a Local/Remote descriptor, mfs\_load\_property\_groups extracts the attacker-controlled property name (bounded only by the message length) and, when no value follows, formats it into a fixed 512-byte error\_msg field of the MfsErlDrvData struct using an unchecked sprintf call. Names longer than roughly 452 bytes overflow into the immediately following struct fields (text\_buf, text\_ptr, term\_spec, term\_spec\_size, term\_spec\_index), overwriting live pointers and counters with attacker-chosen bytes. Subsequent scanner code writes and frees through the corrupted pointers, producing arbitrary write and arbitrary free primitives inside the BEAM VM process, which can be leveraged for remote code execution. On builds compiled with \_FORTIFY\_SOURCE the overflow is detected at runtime and terminates the process with SIGABRT, resulting in denial of service.

The overflow occurs in the flex scanner before any grammar or Megaco-level authentication processing, so exploitation requires only network reachability to the megaco transport port on a node configured with {scanner, flex}.

This vulnerability is associated with program files lib/megaco/src/flex/megaco\_flex\_scanner\_drv.flex.src and program routines mfs\_load\_property\_groups.

This issue affects OTP from OTP 17.0 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to megaco from 3.17.1 before 4.7.2.2, 4.8.3.1, and 4.9.1. Whether OTP before OTP 17.0, corresponding to megaco before 3.17.1, is affected is unknown.

## Affected and fixed versions

- Erlang OTP: \>= 3.17.1, \< \* (cvelist)
- Erlang OTP: \>= 17.0, \< \* (cvelist)
- Erlang OTP: \>= 84adefa331c4159d432d22840663c38f155cd4c1, \< 8704c8f550a11ed5f825e3c011ecb03565b79c4f (cvelist)

## Mitigation

- Upgrade OTP to 8704c8f550a11ed5f825e3c011ecb03565b79c4f or later.
- Vendor workaround: Switch the megaco text codec to the default Erlang-based scanner by removing {scanner, flex} from the encoder configuration. The Erlang scanner is not affected by this C-level memory corruption, at the cost of reduced parsing throughput.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-59250. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-59250.md
Affected: Erlang OTP >= 3.17.1, < *; Erlang OTP >= 17.0, < *; Erlang OTP >= 84adefa331c4159d432d22840663c38f155cd4c1, < 8704c8f550a11ed5f825e3c011ecb03565b79c4f
Fixed in: Erlang OTP 8704c8f550a11ed5f825e3c011ecb03565b79c4f

Steps:
1. Search this machine and project for Erlang OTP: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-59250 being exploited?

There is no confirmed exploitation: CVE-2026-59250 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.21% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-59250?

High: CVSS 8.3 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-59250?

Erlang OTP \>= 3.17.1, \< \*; Erlang OTP \>= 17.0, \< \*; Erlang OTP \>= 84adefa331c4159d432d22840663c38f155cd4c1, \< 8704c8f550a11ed5f825e3c011ecb03565b79c4f.

### Is there a fix for CVE-2026-59250?

Yes. Fixed in Erlang OTP 8704c8f550a11ed5f825e3c011ecb03565b79c4f. Upgrade OTP to 8704c8f550a11ed5f825e3c011ecb03565b79c4f or later. Vendor workaround: Switch the megaco text codec to the default Erlang-based scanner by removing {scanner, flex} from the encoder configuration. The Erlang scanner is not affected by this C-level memory corruption, at the cost of reduced parsing throughput.

### How do I check if I'm affected by CVE-2026-59250?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/erlang/otp/security/advisories/GHSA-7xgh-gmgf-q2g7>
- patch: <https://github.com/erlang/otp/commit/8704c8f550a11ed5f825e3c011ecb03565b79c4f>
- other: <https://cna.erlef.org/cves/CVE-2026-59250.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-59250>
- other: <https://www.erlang.org/doc/system/versions.html#order-of-versions>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-59250>

HTML: <https://flawdb.com/CVE-2026-59250> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-59250>
