← Back to CVE Explorer

CVE-2026-53429

Full vulnerability record from the local CVENow database.

Description

Missing Release of Memory after Effective Lifetime vulnerability in leandrocp mdex and mdex_native allows an attacker who controls a rendered document to cause a denial of service through unbounded native memory exhaustion. The native rendering code permanently leaks memory when rendering a document that contains escaped-tag nodes. The conversion of each %MDEx.EscapedTag{} node into its native representation (From<ExEscapedTag> for NodeValue in the Rust NIF) calls Box::leak on the caller-supplied literal string, which surrenders the backing allocation so that it lives for the entire lifetime of the operating system process and is never freed. Both the byte length of each literal and the number of escaped-tag nodes in a document are attacker-controlled, and there is no size cap, rate limit, or string interning on this path. Every render of a document containing escaped-tag nodes therefore leaks literal_size x node_count bytes that can never be reclaimed, and repeated renders accumulate without bound. Rendering reaches this path through the public MDEx.to_html/1 entry point and any other API that renders a supplied %MDEx.Document{}. Any application that uses mdex (or mdex_native directly) to render documents derived from user-supplied content is affected. Because the leaked memory is never reclaimed for the life of the BEAM process, an attacker can drive resident memory upward without limit until the node exhausts memory and crashes, taking down every process on it. The vulnerable native code originally shipped inside mdex (in native/comrak_nif/src/types/document.rs) and was later extracted into the separate mdex_native package (native/mdex_native_nif/src/types/document.rs), where it remains unpatched. This issue affects mdex from 0.11.0 before 0.12.3, and mdex_native from 0.1.0 before 0.2.3.

Severity
MEDIUM
CVSS score
6.9 (v4.0)
Vulnerability status
Deferred
Source identifier
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Published
2026-06-29 20:17:39.033000
Last modified
2026-10-25 21:10:00.770000
View original CVE JSON
{
  "id": "CVE-2026-53429",
  "sourceIdentifier": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
  "published": "2026-06-29T20:17:39.033",
  "lastModified": "2026-10-25T21:10:00.770",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Missing Release of Memory after Effective Lifetime vulnerability in leandrocp mdex and mdex_native allows an attacker who controls a rendered document to cause a denial of service through unbounded native memory exhaustion.\n\nThe native rendering code permanently leaks memory when rendering a document that contains escaped-tag nodes. The conversion of each %MDEx.EscapedTag{} node into its native representation (From<ExEscapedTag> for NodeValue in the Rust NIF) calls Box::leak on the caller-supplied literal string, which surrenders the backing allocation so that it lives for the entire lifetime of the operating system process and is never freed.\n\nBoth the byte length of each literal and the number of escaped-tag nodes in a document are attacker-controlled, and there is no size cap, rate limit, or string interning on this path. Every render of a document containing escaped-tag nodes therefore leaks literal_size x node_count bytes that can never be reclaimed, and repeated renders accumulate without bound. Rendering reaches this path through the public MDEx.to_html/1 entry point and any other API that renders a supplied %MDEx.Document{}.\n\nAny application that uses mdex (or mdex_native directly) to render documents derived from user-supplied content is affected. Because the leaked memory is never reclaimed for the life of the BEAM process, an attacker can drive resident memory upward without limit until the node exhausts memory and crashes, taking down every process on it.\n\nThe vulnerable native code originally shipped inside mdex (in native/comrak_nif/src/types/document.rs) and was later extracted into the separate mdex_native package (native/mdex_native_nif/src/types/document.rs), where it remains unpatched.\n\nThis issue affects mdex from 0.11.0 before 0.12.3, and mdex_native from 0.1.0 before 0.2.3."
    },
    {
      "lang": "es",
      "value": "Vulnerabilidad de liberación de memoria faltante después de la vida útil efectiva en leandrocp mdex y mdex_native permite a un atacante que controla un documento renderizado causar una denegación de servicio a través del agotamiento ilimitado de la memoria nativa.\n\nEl código de renderizado nativo fuga memoria permanentemente al renderizar un documento que contiene nodos de etiqueta escapada. La conversión de cada nodo %MDEx.EscapedTag{} en su representación nativa (From[ExEscapedTag] para NodeValue en el NIF de Rust) llama a Box::leak en la cadena literal proporcionada por el llamador, lo que cede la asignación de respaldo para que viva durante toda la vida útil del proceso del sistema operativo y nunca se libere.\n\nTanto la longitud en bytes de cada literal como el número de nodos de etiqueta escapada en un documento están controlados por el atacante, y no hay límite de tamaño, límite de velocidad o internamiento de cadenas en esta ruta. Cada renderizado de un documento que contiene nodos de etiqueta escapada, por lo tanto, fuga literal_size x node_count bytes que nunca pueden ser reclamados, y los renderizados repetidos se acumulan sin límite. El renderizado alcanza esta ruta a través del punto de entrada público MDEx.to_html/1 y cualquier otra API que renderice un %MDEx.Document{} proporcionado.\n\nCualquier aplicación que utilice mdex (o mdex_native directamente) para renderizar documentos derivados de contenido proporcionado por el usuario se ve afectada. Debido a que la memoria fugada nunca se reclama durante la vida útil del proceso BEAM, un atacante puede impulsar la memoria residente hacia arriba sin límite hasta que el nodo agote la memoria y falle, derribando cada proceso en él.\n\nEl código nativo vulnerable se envió originalmente dentro de mdex (en native/comrak_nif/src/types/document.rs) y fue posteriormente extraído en el paquete mdex_native separado (native/mdex_native_nif/src/types/document.rs), donde permanece sin parchear.\n\nEste problema afecta a mdex desde 0.11.0 antes de 0.12.3, y a mdex_native desde 0.1.0 antes de 0.2.3."
    }
  ],
  "affected": [
    {
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "affectedData": [
        {
          "vendor": "leandrocp",
          "product": "mdex",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.hex.pm",
          "packageName": "mdex",
          "cpes": [
            "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.MDEx'",
            "comrak_nif"
          ],
          "programFiles": [
            "native/comrak_nif/src/types/document.rs"
          ],
          "programRoutines": [
            {
              "name": "comrak_nif::document_to_html_with_options"
            },
            {
              "name": "'Elixir.MDEx.Native':document_to_html_with_options/2"
            },
            {
              "name": "'Elixir.MDEx':to_html/1"
            }
          ],
          "repo": "https://github.com/leandrocp/mdex",
          "packageURL": "pkg:hex/mdex",
          "versions": [
            {
              "version": "0.11.0",
              "lessThan": "0.12.3",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "leandrocp",
          "product": "mdex",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com",
          "packageName": "leandrocp/mdex",
          "cpes": [
            "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.MDEx'",
            "comrak_nif"
          ],
          "programFiles": [
            "native/comrak_nif/src/types/document.rs"
          ],
          "programRoutines": [
            {
              "name": "comrak_nif::document_to_html_with_options"
            },
            {
              "name": "'Elixir.MDEx.Native':document_to_html_with_options/2"
            },
            {
              "name": "'Elixir.MDEx':to_html/1"
            }
          ],
          "repo": "https://github.com/leandrocp/mdex",
          "packageURL": "pkg:github/leandrocp/mdex",
          "versions": [
            {
              "version": "81e4d14dd3aa5b206e395c7f372b9b413793015f",
              "lessThan": "6ed94d905f97af188323f042698ae841c02293b4",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "leandrocp",
          "product": "mdex_native",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.hex.pm",
          "packageName": "mdex_native",
          "cpes": [
            "cpe:2.3:a:leandrocp:mdex_native:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.MDExNative.Comrak'",
            "mdex_native_nif"
          ],
          "programFiles": [
            "native/mdex_native_nif/src/types/document.rs"
          ],
          "programRoutines": [
            {
              "name": "mdex_native_nif::document_to_html_with_options"
            },
            {
              "name": "'Elixir.MDExNative.Native':document_to_html_with_options/2"
            },
            {
              "name": "'Elixir.MDExNative.Comrak':document_to_html/2"
            }
          ],
          "repo": "https://github.com/leandrocp/mdex_native",
          "packageURL": "pkg:hex/mdex_native",
          "versions": [
            {
              "version": "0.1.0",
              "lessThan": "0.2.3",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "leandrocp",
          "product": "mdex_native",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com",
          "packageName": "leandrocp/mdex_native",
          "cpes": [
            "cpe:2.3:a:leandrocp:mdex_native:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.MDExNative.Comrak'",
            "mdex_native_nif"
          ],
          "programFiles": [
            "native/mdex_native_nif/src/types/document.rs"
          ],
          "programRoutines": [
            {
              "name": "mdex_native_nif::document_to_html_with_options"
            },
            {
              "name": "'Elixir.MDExNative.Native':document_to_html_with_options/2"
            },
            {
              "name": "'Elixir.MDExNative.Comrak':document_to_html/2"
            }
          ],
          "repo": "https://github.com/leandrocp/mdex_native",
          "packageURL": "pkg:github/leandrocp/mdex_native",
          "versions": [
            {
              "version": "956528c5e31746253347029e810a969ab916fd27",
              "lessThan": "cbd927fb5061b488de8d90a8ef6df65718ca1fe6",
              "versionType": "git",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV40": [
      {
        "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "type": "Secondary",
        "cvssData": {
          "version": "4.0",
          "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/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": 6.9,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "attackRequirements": "NONE",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "vulnConfidentialityImpact": "NONE",
          "vulnIntegrityImpact": "NONE",
          "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-06-29T20:45:00.827777Z",
          "id": "CVE-2026-53429",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "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-401"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://cna.erlef.org/cves/CVE-2026-53429.html",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://github.com/leandrocp/mdex_native/commit/cbd927fb5061b488de8d90a8ef6df65718ca1fe6",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://github.com/leandrocp/mdex_native/security/advisories/GHSA-cmvp-gp9f-23xw",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-53429",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://github.com/leandrocp/mdex_native/security/advisories/GHSA-cmvp-gp9f-23xw",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
    }
  ]
}