CVE-2026-59250
Full vulnerability record from the local CVENow database.
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, from OTP 28.0 before OTP 28.5.0.4, and from OTP 29.0 before OTP 29.0.4, corresponding to megaco from 3.17.1 before 4.7.2.2, from 4.8 before 4.8.3.1, and from 4.9 before 4.9.1. Whether OTP before OTP 17.0, corresponding to megaco before 3.17.1, is affected is unknown.
View original CVE JSON
{
"id": "CVE-2026-59250",
"sourceIdentifier": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"published": "2026-07-27T16:18:03.330",
"lastModified": "2026-10-24T13:10:00.147",
"vulnStatus": "Awaiting Analysis",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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.\n\nWhen 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.\n\nThe 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}.\n\nThis vulnerability is associated with program files lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src and program routines mfs_load_property_groups.\n\nThis issue affects OTP from OTP 17.0 before OTP 27.3.4.15, from OTP 28.0 before OTP 28.5.0.4, and from OTP 29.0 before OTP 29.0.4, corresponding to megaco from 3.17.1 before 4.7.2.2, from 4.8 before 4.8.3.1, and from 4.9 before 4.9.1. Whether OTP before OTP 17.0, corresponding to megaco before 3.17.1, is affected is unknown."
},
{
"lang": "es",
"value": "Clásico desbordamiento de búfer en el controlador C del escáner flex megaco de Erlang/OTP permite a un atacante remoto no autenticado corromper la memoria del controlador (y potencialmente lograr la ejecución remota de código o un fallo por denegación de servicio) enviando un único mensaje H.248/Megaco codificado en texto que contiene un nombre de parámetro de propiedad sobredimensionado.\n\nAl tokenizar un descriptor Local/Remoto, mfs_load_property_groups extrae el nombre de propiedad controlado por el atacante (limitado solo por la longitud del mensaje) y, cuando no le sigue ningún valor, lo formatea en un campo error_msg fijo de 512 bytes de la estructura MfsErlDrvData utilizando una llamada sprintf sin verificar. Nombres de más de aproximadamente 452 bytes desbordan los campos de la estructura inmediatamente siguientes (text_buf, text_ptr, term_spec, term_spec_size, term_spec_index), sobrescribiendo punteros y contadores activos con bytes elegidos por el atacante. El código del escáner posterior escribe y libera a través de los punteros corruptos, produciendo primitivas de escritura arbitraria y liberación arbitraria dentro del proceso de la VM BEAM, que pueden ser aprovechadas para la ejecución remota de código. En compilaciones con _FORTIFY_SOURCE, el desbordamiento se detecta en tiempo de ejecución y termina el proceso con SIGABRT, lo que resulta en denegación de servicio.\n\nEl desbordamiento ocurre en el escáner flex antes de cualquier procesamiento de gramática o autenticación a nivel Megaco, por lo que la explotación requiere solo accesibilidad de red al puerto de transporte megaco en un nodo configurado con {scanner, flex}.\n\nEsta vulnerabilidad está asociada con los archivos de programa lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src y las rutinas de programa mfs_load_property_groups.\n\nEste problema afecta a OTP desde OTP 17.0 antes de OTP 29.0.4, OTP 28.5.0.4 y OTP 27.3.4.15, lo que corresponde a megaco desde 3.17.1 antes de 4.9.1, 4.8.3.1 y 4.7.2.2. Las versiones anteriores a OTP 17.0 también están afectadas, pero no se enumeran porque el esquema de versiones de OTP solo se define a partir de OTP 17.0 en adelante."
}
],
"affected": [
{
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"affectedData": [
{
"vendor": "Erlang",
"product": "OTP",
"defaultStatus": "unaffected",
"packageName": "otp",
"cpes": [
"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
],
"modules": [
"megaco_flex_scanner",
"megaco_flex_scanner_drv"
],
"programFiles": [
"lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src"
],
"programRoutines": [
{
"name": "mfs_load_property_groups"
},
{
"name": "megaco_flex_scanner:scan/2"
}
],
"packageURL": "pkg:software-id/erlang.org/otp",
"versions": [
{
"version": "0",
"lessThan": "17.0",
"versionType": "otp",
"status": "unknown"
},
{
"version": "17.0",
"lessThan": "27.3.4.15",
"versionType": "otp",
"status": "affected"
},
{
"version": "28.0",
"lessThan": "28.5.0.4",
"versionType": "otp",
"status": "affected"
},
{
"version": "29.0",
"lessThan": "29.0.4",
"versionType": "otp",
"status": "affected"
}
]
},
{
"vendor": "Erlang",
"product": "OTP",
"defaultStatus": "unaffected",
"packageName": "megaco",
"cpes": [
"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
],
"modules": [
"megaco_flex_scanner",
"megaco_flex_scanner_drv"
],
"programFiles": [
"src/flex/megaco_flex_scanner_drv.flex.src"
],
"programRoutines": [
{
"name": "mfs_load_property_groups"
},
{
"name": "megaco_flex_scanner:scan/2"
}
],
"repo": "https://github.com/erlang/otp",
"packageURL": "pkg:otp/megaco?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git",
"versions": [
{
"version": "0",
"lessThan": "3.17.1",
"versionType": "otp",
"status": "unknown"
},
{
"version": "3.17.1",
"lessThan": "4.7.2.2",
"versionType": "otp",
"status": "affected"
},
{
"version": "4.8",
"lessThan": "4.8.3.1",
"versionType": "otp",
"status": "affected"
},
{
"version": "4.9",
"lessThan": "4.9.1",
"versionType": "otp",
"status": "affected"
}
]
},
{
"vendor": "Erlang",
"product": "OTP",
"defaultStatus": "unaffected",
"collectionURL": "https://github.com",
"packageName": "erlang/otp",
"cpes": [
"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
],
"modules": [
"megaco_flex_scanner",
"megaco_flex_scanner_drv"
],
"programFiles": [
"lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src"
],
"programRoutines": [
{
"name": "mfs_load_property_groups"
},
{
"name": "megaco_flex_scanner:scan/2"
}
],
"repo": "https://github.com/erlang/otp",
"packageURL": "pkg:github/erlang/otp",
"versions": [
{
"version": "84adefa331c4159d432d22840663c38f155cd4c1",
"lessThan": "8704c8f550a11ed5f825e3c011ecb03565b79c4f",
"versionType": "git",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV40": [
{
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"type": "Secondary",
"cvssData": {
"version": "4.0",
"vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"baseScore": 8.3,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"vulnConfidentialityImpact": "NONE",
"vulnIntegrityImpact": "LOW",
"vulnAvailabilityImpact": "HIGH",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"subAvailabilityImpact": "NONE",
"exploitMaturity": "NOT_DEFINED",
"confidentialityRequirement": "NOT_DEFINED",
"integrityRequirement": "NOT_DEFINED",
"availabilityRequirement": "NOT_DEFINED",
"modifiedAttackVector": "NOT_DEFINED",
"modifiedAttackComplexity": "NOT_DEFINED",
"modifiedAttackRequirements": "NOT_DEFINED",
"modifiedPrivilegesRequired": "NOT_DEFINED",
"modifiedUserInteraction": "NOT_DEFINED",
"modifiedVulnConfidentialityImpact": "NOT_DEFINED",
"modifiedVulnIntegrityImpact": "NOT_DEFINED",
"modifiedVulnAvailabilityImpact": "NOT_DEFINED",
"modifiedSubConfidentialityImpact": "NOT_DEFINED",
"modifiedSubIntegrityImpact": "NOT_DEFINED",
"modifiedSubAvailabilityImpact": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"valueDensity": "NOT_DEFINED",
"vulnerabilityResponseEffort": "NOT_DEFINED",
"providerUrgency": "NOT_DEFINED"
}
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-07-27T18:33:04.735708Z",
"id": "CVE-2026-59250",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-120"
},
{
"lang": "en",
"value": "CWE-787"
}
]
}
],
"references": [
{
"url": "https://cna.erlef.org/cves/CVE-2026-59250.html",
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
},
{
"url": "https://github.com/erlang/otp/commit/8704c8f550a11ed5f825e3c011ecb03565b79c4f",
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
},
{
"url": "https://github.com/erlang/otp/security/advisories/GHSA-7xgh-gmgf-q2g7",
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
},
{
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-59250",
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
},
{
"url": "https://www.erlang.org/doc/system/versions.html#order-of-versions",
"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
}
]
}