CVE-2026-59250 (GCVE-0-2026-59250)
Vulnerability from cvelistv5
Published
2026-07-27 15:25
Modified
2026-08-25 23:37
CWE
  • CWE-120 - Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
  • CWE-787 - Out-of-bounds Write
Summary
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.
Impacted products
Vendor Product Version
Erlang OTP Version: 17.0
Version: 28.0
Version: 29.0
    cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
Create a notification for this product.
   Erlang OTP Version: 3.17.1
Version: 4.8
Version: 4.9
    cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
Create a notification for this product.
   Erlang OTP Version: 84adefa331c4159d432d22840663c38f155cd4c1
    cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-59250",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-07-27T18:33:04.735708Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-07-27T18:33:14.927Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "cpes": [
            "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "modules": [
            "megaco_flex_scanner",
            "megaco_flex_scanner_drv"
          ],
          "packageName": "otp",
          "packageURL": "pkg:sid/erlang.org/otp",
          "product": "OTP",
          "programFiles": [
            "lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src"
          ],
          "programRoutines": [
            {
              "name": "mfs_load_property_groups"
            },
            {
              "name": "megaco_flex_scanner:scan/2"
            }
          ],
          "vendor": "Erlang",
          "versions": [
            {
              "lessThan": "17.0",
              "status": "unknown",
              "version": "0",
              "versionType": "otp"
            },
            {
              "lessThan": "27.3.4.15",
              "status": "affected",
              "version": "17.0",
              "versionType": "otp"
            },
            {
              "lessThan": "28.5.0.4",
              "status": "affected",
              "version": "28.0",
              "versionType": "otp"
            },
            {
              "lessThan": "29.0.4",
              "status": "affected",
              "version": "29.0",
              "versionType": "otp"
            }
          ]
        },
        {
          "cpes": [
            "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "modules": [
            "megaco_flex_scanner",
            "megaco_flex_scanner_drv"
          ],
          "packageName": "megaco",
          "packageURL": "pkg:otp/megaco?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp\u0026vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git",
          "product": "OTP",
          "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",
          "vendor": "Erlang",
          "versions": [
            {
              "lessThan": "3.17.1",
              "status": "unknown",
              "version": "0",
              "versionType": "otp"
            },
            {
              "lessThan": "4.7.2.2",
              "status": "affected",
              "version": "3.17.1",
              "versionType": "otp"
            },
            {
              "lessThan": "4.8.3.1",
              "status": "affected",
              "version": "4.8",
              "versionType": "otp"
            },
            {
              "lessThan": "4.9.1",
              "status": "affected",
              "version": "4.9",
              "versionType": "otp"
            }
          ]
        },
        {
          "collectionURL": "https://github.com",
          "cpes": [
            "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "modules": [
            "megaco_flex_scanner",
            "megaco_flex_scanner_drv"
          ],
          "packageName": "erlang/otp",
          "packageURL": "pkg:github/erlang/otp",
          "product": "OTP",
          "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",
          "vendor": "Erlang",
          "versions": [
            {
              "lessThan": "8704c8f550a11ed5f825e3c011ecb03565b79c4f",
              "status": "affected",
              "version": "84adefa331c4159d432d22840663c38f155cd4c1",
              "versionType": "git"
            }
          ]
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eThe megaco text codec must be configured to use the flex scanner via the encoder option \u003ccode\u003e{scanner, flex}\u003c/code\u003e (the documented high-performance configuration). Deployments using the default Erlang-based scanner are not affected.\u003c/p\u003e"
            },
            {
              "base64": false,
              "type": "text/markdown",
              "value": "The megaco text codec must be configured to use the flex scanner via the encoder option `{scanner, flex}` (the documented high-performance configuration). Deployments using the default Erlang-based scanner are not affected."
            }
          ],
          "value": "The megaco text codec must be configured to use the flex scanner via the encoder option {scanner, flex} (the documented high-performance configuration). Deployments using the default Erlang-based scanner are not affected."
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "27.3.4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "28.5.0.4",
                  "versionStartIncluding": "28.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "29.0.4",
                  "versionStartIncluding": "29.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ],
          "operator": "AND"
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Jonatan M\u00e4nnchen / EEF"
        },
        {
          "lang": "en",
          "type": "remediation developer",
          "value": "Jakub Witczak"
        },
        {
          "lang": "en",
          "type": "remediation reviewer",
          "value": "Micael Karlberg"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eClassic buffer overflow in the Erlang/OTP megaco flex scanner C driver allows a remote unauthenticated attacker to corrupt the driver\u0027s 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.\u003c/p\u003e\n\u003cp\u003eWhen tokenizing a Local/Remote descriptor, \u003ccode\u003emfs_load_property_groups\u003c/code\u003e extracts the attacker-controlled property name (bounded only by the message length) and, when no value follows, formats it into a fixed 512-byte \u003ccode\u003eerror_msg\u003c/code\u003e field of the \u003ccode\u003eMfsErlDrvData\u003c/code\u003e struct using an unchecked \u003ccode\u003esprintf\u003c/code\u003e call. Names longer than roughly 452 bytes overflow into the immediately following struct fields (\u003ccode\u003etext_buf\u003c/code\u003e, \u003ccode\u003etext_ptr\u003c/code\u003e, \u003ccode\u003eterm_spec\u003c/code\u003e, \u003ccode\u003eterm_spec_size\u003c/code\u003e, \u003ccode\u003eterm_spec_index\u003c/code\u003e), 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 \u003ccode\u003e_FORTIFY_SOURCE\u003c/code\u003e the overflow is detected at runtime and terminates the process with \u003ccode\u003eSIGABRT\u003c/code\u003e, resulting in denial of service.\u003c/p\u003e\n\u003cp\u003eThe 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 \u003ccode\u003e{scanner, flex}\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eThis vulnerability is associated with program files \u003ccode\u003elib/megaco/src/flex/megaco_flex_scanner_drv.flex.src\u003c/code\u003e and program routines \u003ccode\u003emfs_load_property_groups\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eThis issue affects OTP from OTP\u0026nbsp;17.0 before OTP\u0026nbsp;27.3.4.15, from OTP\u0026nbsp;28.0 before OTP\u0026nbsp;28.5.0.4, and from OTP\u0026nbsp;29.0 before OTP\u0026nbsp;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\u0026nbsp;17.0, corresponding to megaco before 3.17.1, is affected is unknown.\u003c/p\u003e"
            },
            {
              "base64": false,
              "type": "text/markdown",
              "value": "Classic buffer overflow in the Erlang/OTP megaco flex scanner C driver allows a remote unauthenticated attacker to corrupt the driver\u0027s 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\u00a017.0 before OTP\u00a027.3.4.15, from OTP\u00a028.0 before OTP\u00a028.5.0.4, and from OTP\u00a029.0 before OTP\u00a029.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\u00a017.0, corresponding to megaco before 3.17.1, is affected is unknown."
            }
          ],
          "value": "Classic buffer overflow in the Erlang/OTP megaco flex scanner C driver allows a remote unauthenticated attacker to corrupt the driver\u0027s 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\u00a017.0 before OTP\u00a027.3.4.15, from OTP\u00a028.0 before OTP\u00a028.5.0.4, and from OTP\u00a029.0 before OTP\u00a029.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\u00a017.0, corresponding to megaco before 3.17.1, is affected is unknown."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-100",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-100 Overflow Buffers"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NOT_DEFINED",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "LOW",
            "attackRequirements": "PRESENT",
            "attackVector": "NETWORK",
            "baseScore": 8.3,
            "baseSeverity": "HIGH",
            "privilegesRequired": "NONE",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "NONE",
            "subIntegrityImpact": "NONE",
            "userInteraction": "NONE",
            "valueDensity": "NOT_DEFINED",
            "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",
            "version": "4.0",
            "vulnAvailabilityImpact": "HIGH",
            "vulnConfidentialityImpact": "NONE",
            "vulnIntegrityImpact": "LOW",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-120",
              "description": "CWE-120 Buffer Copy without Checking Size of Input (\u0027Classic Buffer Overflow\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-787",
              "description": "CWE-787 Out-of-bounds Write",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-25T23:37:43.717Z",
        "orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "shortName": "EEF"
      },
      "references": [
        {
          "tags": [
            "vendor-advisory",
            "related"
          ],
          "url": "https://github.com/erlang/otp/security/advisories/GHSA-7xgh-gmgf-q2g7"
        },
        {
          "tags": [
            "related"
          ],
          "url": "https://cna.erlef.org/cves/CVE-2026-59250.html"
        },
        {
          "tags": [
            "related"
          ],
          "url": "https://osv.dev/vulnerability/EEF-CVE-2026-59250"
        },
        {
          "tags": [
            "x_version-scheme"
          ],
          "url": "https://www.erlang.org/doc/system/versions.html#order-of-versions"
        },
        {
          "tags": [
            "patch"
          ],
          "url": "https://github.com/erlang/otp/commit/8704c8f550a11ed5f825e3c011ecb03565b79c4f"
        }
      ],
      "source": {
        "discovery": "INTERNAL"
      },
      "title": "Megaco flex scanner buffer overflow via oversized property parm name",
      "workarounds": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eSwitch the megaco text codec to the default Erlang-based scanner by removing \u003ccode\u003e{scanner, flex}\u003c/code\u003e from the encoder configuration. The Erlang scanner is not affected by this C-level memory corruption, at the cost of reduced parsing throughput.\u003c/p\u003e"
            },
            {
              "base64": false,
              "type": "text/markdown",
              "value": "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."
            }
          ],
          "value": "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."
        }
      ]
    }
  },
  "cveMetadata": {
    "assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
    "assignerShortName": "EEF",
    "cveId": "CVE-2026-59250",
    "datePublished": "2026-07-27T15:25:03.106Z",
    "dateReserved": "2026-07-04T04:24:03.653Z",
    "dateUpdated": "2026-08-25T23:37:43.717Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-59250\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-07-27T18:33:04.735708Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-07-27T18:33:10.223Z\"}}], \"cna\": {\"title\": \"Megaco flex scanner buffer overflow via oversized property parm name\", \"source\": {\"discovery\": \"INTERNAL\"}, \"credits\": [{\"lang\": \"en\", \"type\": \"finder\", \"value\": \"Jonatan M\\u00e4nnchen / EEF\"}, {\"lang\": \"en\", \"type\": \"remediation developer\", \"value\": \"Jakub Witczak\"}, {\"lang\": \"en\", \"type\": \"remediation reviewer\", \"value\": \"Micael Karlberg\"}], \"impacts\": [{\"capecId\": \"CAPEC-100\", \"descriptions\": [{\"lang\": \"en\", \"value\": \"CAPEC-100 Overflow Buffers\"}]}], \"metrics\": [{\"format\": \"CVSS\", \"cvssV4_0\": {\"Safety\": \"NOT_DEFINED\", \"version\": \"4.0\", \"Recovery\": \"NOT_DEFINED\", \"baseScore\": 8.3, \"Automatable\": \"NOT_DEFINED\", \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"valueDensity\": \"NOT_DEFINED\", \"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\", \"providerUrgency\": \"NOT_DEFINED\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"attackRequirements\": \"PRESENT\", \"privilegesRequired\": \"NONE\", \"subIntegrityImpact\": \"NONE\", \"vulnIntegrityImpact\": \"LOW\", \"subAvailabilityImpact\": \"NONE\", \"vulnAvailabilityImpact\": \"HIGH\", \"subConfidentialityImpact\": \"NONE\", \"vulnConfidentialityImpact\": \"NONE\", \"vulnerabilityResponseEffort\": \"NOT_DEFINED\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"GENERAL\"}]}], \"affected\": [{\"cpes\": [\"cpe:2.3:a:erlang:erlang\\\\/otp:*:*:*:*:*:*:*:*\"], \"vendor\": \"Erlang\", \"modules\": [\"megaco_flex_scanner\", \"megaco_flex_scanner_drv\"], \"product\": \"OTP\", \"versions\": [{\"status\": \"unknown\", \"version\": \"0\", \"lessThan\": \"17.0\", \"versionType\": \"otp\"}, {\"status\": \"affected\", \"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\"}], \"packageURL\": \"pkg:sid/erlang.org/otp\", \"packageName\": \"otp\", \"programFiles\": [\"lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src\"], \"defaultStatus\": \"unaffected\", \"programRoutines\": [{\"name\": \"mfs_load_property_groups\"}, {\"name\": \"megaco_flex_scanner:scan/2\"}]}, {\"cpes\": [\"cpe:2.3:a:erlang:erlang\\\\/otp:*:*:*:*:*:*:*:*\"], \"repo\": \"https://github.com/erlang/otp\", \"vendor\": \"Erlang\", \"modules\": [\"megaco_flex_scanner\", \"megaco_flex_scanner_drv\"], \"product\": \"OTP\", \"versions\": [{\"status\": \"unknown\", \"version\": \"0\", \"lessThan\": \"3.17.1\", \"versionType\": \"otp\"}, {\"status\": \"affected\", \"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\"}], \"packageURL\": \"pkg:otp/megaco?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp\u0026vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git\", \"packageName\": \"megaco\", \"programFiles\": [\"src/flex/megaco_flex_scanner_drv.flex.src\"], \"defaultStatus\": \"unaffected\", \"programRoutines\": [{\"name\": \"mfs_load_property_groups\"}, {\"name\": \"megaco_flex_scanner:scan/2\"}]}, {\"cpes\": [\"cpe:2.3:a:erlang:erlang\\\\/otp:*:*:*:*:*:*:*:*\"], \"repo\": \"https://github.com/erlang/otp\", \"vendor\": \"Erlang\", \"modules\": [\"megaco_flex_scanner\", \"megaco_flex_scanner_drv\"], \"product\": \"OTP\", \"versions\": [{\"status\": \"affected\", \"version\": \"84adefa331c4159d432d22840663c38f155cd4c1\", \"lessThan\": \"8704c8f550a11ed5f825e3c011ecb03565b79c4f\", \"versionType\": \"git\"}], \"packageURL\": \"pkg:github/erlang/otp\", \"packageName\": \"erlang/otp\", \"programFiles\": [\"lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src\"], \"collectionURL\": \"https://github.com\", \"defaultStatus\": \"unaffected\", \"programRoutines\": [{\"name\": \"mfs_load_property_groups\"}, {\"name\": \"megaco_flex_scanner:scan/2\"}]}], \"references\": [{\"url\": \"https://github.com/erlang/otp/security/advisories/GHSA-7xgh-gmgf-q2g7\", \"tags\": [\"vendor-advisory\", \"related\"]}, {\"url\": \"https://cna.erlef.org/cves/CVE-2026-59250.html\", \"tags\": [\"related\"]}, {\"url\": \"https://osv.dev/vulnerability/EEF-CVE-2026-59250\", \"tags\": [\"related\"]}, {\"url\": \"https://www.erlang.org/doc/system/versions.html#order-of-versions\", \"tags\": [\"x_version-scheme\"]}, {\"url\": \"https://github.com/erlang/otp/commit/8704c8f550a11ed5f825e3c011ecb03565b79c4f\", \"tags\": [\"patch\"]}], \"workarounds\": [{\"lang\": \"en\", \"value\": \"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.\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"\u003cp\u003eSwitch the megaco text codec to the default Erlang-based scanner by removing \u003ccode\u003e{scanner, flex}\u003c/code\u003e from the encoder configuration. The Erlang scanner is not affected by this C-level memory corruption, at the cost of reduced parsing throughput.\u003c/p\u003e\", \"base64\": false}, {\"type\": \"text/markdown\", \"value\": \"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.\", \"base64\": false}]}], \"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\u0027s 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\\u00a017.0 before OTP\\u00a027.3.4.15, from OTP\\u00a028.0 before OTP\\u00a028.5.0.4, and from OTP\\u00a029.0 before OTP\\u00a029.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\\u00a017.0, corresponding to megaco before 3.17.1, is affected is unknown.\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"\u003cp\u003eClassic buffer overflow in the Erlang/OTP megaco flex scanner C driver allows a remote unauthenticated attacker to corrupt the driver\u0027s 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.\u003c/p\u003e\\n\u003cp\u003eWhen tokenizing a Local/Remote descriptor, \u003ccode\u003emfs_load_property_groups\u003c/code\u003e extracts the attacker-controlled property name (bounded only by the message length) and, when no value follows, formats it into a fixed 512-byte \u003ccode\u003eerror_msg\u003c/code\u003e field of the \u003ccode\u003eMfsErlDrvData\u003c/code\u003e struct using an unchecked \u003ccode\u003esprintf\u003c/code\u003e call. Names longer than roughly 452 bytes overflow into the immediately following struct fields (\u003ccode\u003etext_buf\u003c/code\u003e, \u003ccode\u003etext_ptr\u003c/code\u003e, \u003ccode\u003eterm_spec\u003c/code\u003e, \u003ccode\u003eterm_spec_size\u003c/code\u003e, \u003ccode\u003eterm_spec_index\u003c/code\u003e), 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 \u003ccode\u003e_FORTIFY_SOURCE\u003c/code\u003e the overflow is detected at runtime and terminates the process with \u003ccode\u003eSIGABRT\u003c/code\u003e, resulting in denial of service.\u003c/p\u003e\\n\u003cp\u003eThe 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 \u003ccode\u003e{scanner, flex}\u003c/code\u003e.\u003c/p\u003e\\n\u003cp\u003eThis vulnerability is associated with program files \u003ccode\u003elib/megaco/src/flex/megaco_flex_scanner_drv.flex.src\u003c/code\u003e and program routines \u003ccode\u003emfs_load_property_groups\u003c/code\u003e.\u003c/p\u003e\\n\u003cp\u003eThis issue affects OTP from OTP\u0026nbsp;17.0 before OTP\u0026nbsp;27.3.4.15, from OTP\u0026nbsp;28.0 before OTP\u0026nbsp;28.5.0.4, and from OTP\u0026nbsp;29.0 before OTP\u0026nbsp;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\u0026nbsp;17.0, corresponding to megaco before 3.17.1, is affected is unknown.\u003c/p\u003e\", \"base64\": false}, {\"type\": \"text/markdown\", \"value\": \"Classic buffer overflow in the Erlang/OTP megaco flex scanner C driver allows a remote unauthenticated attacker to corrupt the driver\u0027s 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\\u00a017.0 before OTP\\u00a027.3.4.15, from OTP\\u00a028.0 before OTP\\u00a028.5.0.4, and from OTP\\u00a029.0 before OTP\\u00a029.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\\u00a017.0, corresponding to megaco before 3.17.1, is affected is unknown.\", \"base64\": false}]}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-120\", \"description\": \"CWE-120 Buffer Copy without Checking Size of Input (\u0027Classic Buffer Overflow\u0027)\"}]}, {\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-787\", \"description\": \"CWE-787 Out-of-bounds Write\"}]}], \"configurations\": [{\"lang\": \"en\", \"value\": \"The megaco text codec must be configured to use the flex scanner via the encoder option {scanner, flex} (the documented high-performance configuration). Deployments using the default Erlang-based scanner are not affected.\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"\u003cp\u003eThe megaco text codec must be configured to use the flex scanner via the encoder option \u003ccode\u003e{scanner, flex}\u003c/code\u003e (the documented high-performance configuration). Deployments using the default Erlang-based scanner are not affected.\u003c/p\u003e\", \"base64\": false}, {\"type\": \"text/markdown\", \"value\": \"The megaco text codec must be configured to use the flex scanner via the encoder option `{scanner, flex}` (the documented high-performance configuration). Deployments using the default Erlang-based scanner are not affected.\", \"base64\": false}]}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:a:erlang:erlang\\\\/otp:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"27.3.4.15\"}, {\"criteria\": \"cpe:2.3:a:erlang:erlang\\\\/otp:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"28.5.0.4\", \"versionStartIncluding\": \"28.0\"}, {\"criteria\": \"cpe:2.3:a:erlang:erlang\\\\/otp:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"29.0.4\", \"versionStartIncluding\": \"29.0\"}], \"operator\": \"OR\"}], \"operator\": \"AND\"}], \"providerMetadata\": {\"orgId\": \"6b3ad84c-e1a6-4bf7-a703-f496b71e49db\", \"shortName\": \"EEF\", \"dateUpdated\": \"2026-08-25T23:37:43.717Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2026-59250\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-25T23:37:43.717Z\", \"dateReserved\": \"2026-07-04T04:24:03.653Z\", \"assignerOrgId\": \"6b3ad84c-e1a6-4bf7-a703-f496b71e49db\", \"datePublished\": \"2026-07-27T15:25:03.106Z\", \"assignerShortName\": \"EEF\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…