← Back to CVE Explorer

CVE-2026-48591

Full vulnerability record from the local CVENow database.

Description

Improper Neutralization of Script in Attributes in a Web Page vulnerability in pragdave earmark allows stored cross-site scripting via unescaped HTML attribute values. 'Elixir.Earmark.Transform':_make_att1/2 in lib/earmark/transform.ex splices attribute values verbatim between two literal " bytes: [" ", name, "=\"", value, "\""]. Text nodes are routed through the existing escape function which encodes " as &quot;, but attribute values never visit that path. A markdown link whose URL or title contains a bare " closes the attribute early and lets the trailing bytes be parsed by the browser as fresh HTML attributes. For example, [click](http://example.com/?a=x" onerror="alert(1)) renders as <a href="http://example.com/?a=x" onerror="alert(1)">click</a>, executing arbitrary JavaScript in the victim's browser. The earmark library is no longer maintained and has been retired on Hex. No patched version will be released. All releases from 1.4.1 onward are affected, and users should migrate to a maintained Markdown library such as MDEx. This issue affects earmark from 1.4.1 onward.

Severity
MEDIUM
CVSS score
4.8 (v4.0)
Vulnerability status
Deferred
Source identifier
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Published
2026-06-17 18:18:04.370000
Last modified
2026-10-25 23:10:00.167000
View original CVE JSON
{
  "id": "CVE-2026-48591",
  "sourceIdentifier": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
  "published": "2026-06-17T18:18:04.370",
  "lastModified": "2026-10-25T23:10:00.167",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Improper Neutralization of Script in Attributes in a Web Page vulnerability in pragdave earmark allows stored cross-site scripting via unescaped HTML attribute values.\n\n'Elixir.Earmark.Transform':_make_att1/2 in lib/earmark/transform.ex splices attribute values verbatim between two literal \" bytes: [\" \", name, \"=\\\"\", value, \"\\\"\"]. Text nodes are routed through the existing escape function which encodes \" as &quot;, but attribute values never visit that path. A markdown link whose URL or title contains a bare \" closes the attribute early and lets the trailing bytes be parsed by the browser as fresh HTML attributes. For example, [click](http://example.com/?a=x\" onerror=\"alert(1)) renders as <a href=\"http://example.com/?a=x\" onerror=\"alert(1)\">click</a>, executing arbitrary JavaScript in the victim's browser.\n\nThe earmark library is no longer maintained and has been retired on Hex. No patched version will be released. All releases from 1.4.1 onward are affected, and users should migrate to a maintained Markdown library such as MDEx.\n\nThis issue affects earmark from 1.4.1 onward."
    },
    {
      "lang": "es",
      "value": "Vulnerabilidad de neutralización incorrecta de script en atributos en una página web en pragdave earmark permite cross-site scripting almacenado a través de valores de atributos HTML sin escapar.\n\n’Elixir.Earmark.Transform’:_make_att1/2 en lib/earmark/transform.ex empalma valores de atributos textualmente entre dos bytes literales “: [” “, name, ”=\\“”, value, “\\”“]. Los nodos de texto se enrutan a través de la función de escape existente que codifica ” como “, pero los valores de los atributos nunca pasan por esa ruta. Un enlace de markdown cuya URL o título contiene un ” desnudo cierra el atributo prematuramente y permite que los bytes restantes sean analizados por el navegador como nuevos atributos HTML. Por ejemplo, [click](http://example.com/?a=x“ onerror_disabled=”alert(1)) se renderiza como <a href=“http://example.com/?a=x” onerror_disabled=“alert(1)”>click[/a], ejecutando JavaScript arbitrario en el navegador de la víctima.\n\nLa biblioteca earmark ya no se mantiene y ha sido retirada de Hex. Ninguna versión parcheada será lanzada. Todas las versiones desde la 1.4.1 en adelante están afectadas, y los usuarios deberían migrar a una biblioteca de Markdown mantenida como MDEx.\n\nEste problema afecta a earmark desde la 1.4.1 en adelante."
    }
  ],
  "affected": [
    {
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "affectedData": [
        {
          "vendor": "pragdave",
          "product": "earmark",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.hex.pm",
          "packageName": "earmark",
          "cpes": [
            "cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.Earmark.Transform'"
          ],
          "programFiles": [
            "lib/earmark/transform.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.Earmark.Transform':_make_att1/2"
            }
          ],
          "repo": "https://github.com/pragdave/earmark",
          "packageURL": "pkg:hex/earmark",
          "versions": [
            {
              "version": "1.4.1",
              "lessThan": "*",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "pragdave",
          "product": "earmark",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com",
          "packageName": "pragdave/earmark",
          "cpes": [
            "cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.Earmark.Transform'"
          ],
          "programFiles": [
            "lib/earmark/transform.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.Earmark.Transform':_make_att1/2"
            }
          ],
          "repo": "https://github.com/pragdave/earmark",
          "packageURL": "pkg:github/pragdave/earmark",
          "versions": [
            {
              "version": "8236a0570bd894b50e360da08131ec3294c20799",
              "lessThan": "*",
              "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:P/VC:L/VI:L/VA:N/SC:L/SI:L/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": 4.8,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "attackRequirements": "NONE",
          "privilegesRequired": "NONE",
          "userInteraction": "PASSIVE",
          "vulnConfidentialityImpact": "LOW",
          "vulnIntegrityImpact": "LOW",
          "vulnAvailabilityImpact": "NONE",
          "subConfidentialityImpact": "LOW",
          "subIntegrityImpact": "LOW",
          "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-17T18:25:40.841347Z",
          "id": "CVE-2026-48591",
          "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-83"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://cna.erlef.org/cves/CVE-2026-48591.html",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-48591",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    }
  ]
}