Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-46734— league/commonmark Cross-site Scripting vulnerability in Attributes extension

Quick assessment

Affected
thephpleague commonmark
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

commonmark是The League of Extraordinary Packages开源的一个高度可扩展的PHP Markdown解析器,完全支持CommonMark和GFM规范。 commonmark 1.5.0至2.6.x版本存在跨站脚本漏洞,该漏洞源于Attributes扩展允许注入任意HTML属性,可能导致跨站脚本攻击。

CVSS 6.4 · Medium EPSS 0.39% · P35

Possible ATT&CK Techniques 1 AI

T1189 · Drive-by Compromise
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-46734

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
league/commonmark Cross-site Scripting vulnerability in Attributes extension
Source: CVE Program / CVE List V5
Vulnerability Description
league/commonmark is a PHP Markdown parser. A cross-site scripting (XSS) vulnerability in the Attributes extension of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML. The league/commonmark library provides configuration options such as `html_input: 'strip'` and `allow_unsafe_links: false` to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces. Version 2.7.0 contains three changes to prevent this XSS attack vector: All attributes starting with `on` are considered unsafe and blocked by default; support for an explicit allowlist of allowed HTML attributes; and manually-added `href` and `src` attributes now respect the existing `allow_unsafe_links` configuration option. If upgrading is not feasible, please consider disabling the `AttributesExtension` for untrusted users and/or filtering the rendered HTML through a library like HTMLPurifier.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
Source: CVE Program / CVE List V5
Vulnerability Title
commonmark 跨站脚本漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
commonmark是The League of Extraordinary Packages开源的一个高度可扩展的PHP Markdown解析器,完全支持CommonMark和GFM规范。 commonmark 1.5.0至2.6.x版本存在跨站脚本漏洞,该漏洞源于Attributes扩展允许注入任意HTML属性,可能导致跨站脚本攻击。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
thephpleague commonmark < 2.7.0 -

II. Public POCs for CVE-2025-46734

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-46734

请登录查看更多情报信息。

IV. Related Vulnerabilities