CVE-2026-136130: Slack mention injection through link destinations in MDEx.to_slack/2
Summary
Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in leandrocp mdex allows Slack mention and broadcast injection via link, image, and wikilink destinations. MDEx.toslack/2 renders these nodes as Slack <url|label> links and writes the destination between the angle brackets without rejecting Slack control prefixes. A destination such as !channel, !here, @U012AB3CD or !subteam^ID therefore comes out as <!channel|label> or <@U012AB3CD|label>, which Slack treats as a broadcast or a user or group mention. The same sequences in plain text are escaped.
Anyone whose Markdown an application forwards to Slack through MDEx.toslack/2 (user content, tickets, LLM output) can make the posting bot notify a whole channel or ping arbitrary users and groups. In lib/mdex/slackconverter.ex, renderurl/2 only drops URLs that the dangerous-URL check flags, and escapelinkpart/1 only escapes &, <, > and |.
This issue affects mdex: from 0.13.1 before 0.15.0.
Proof of concept
1. Call MDEx.toslack!("plain <!channel> read this !logo ping grp"). 2. Observe the output plain <!channel> <!channel|read this> <!here|logo> <@U012AB3CD|ping> <!subteam^SAZ94GDB8|grp>: the plain-text sequence is escaped, the link and image destinations are emitted as live Slack control sequences. 3. With extension: [wikilinkstitleafterpipe: true], [[!channel|x]] renders as <!channel|x>.
Impact
An attacker who controls Markdown that an application posts to Slack via MDEx.toslack/2 can trigger @channel/@here broadcasts and ping arbitrary users or user groups from the application's bot.
Other sources
Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in leandrocp mdex allows Slack mention and broadcast injection via link, image, and wikilink destinations. MDEx.toslack/2 renders these nodes as Slack <url|label> links and writes the destination between the angle brackets without rejecting Slack control prefixes. A destination such as !channel, !here, @U012AB3CD or !subteam^ID therefore comes out as <!channel|label> or <@U012AB3CD|label>, which Slack treats as a broadcast or a user or group mention. The same sequences in plain text are escaped.
Anyone whose Markdown an application forwards to Slack through MDEx.toslack/2 (user content, tickets, LLM output) can make the posting bot notify a whole channel or ping arbitrary users and groups. In lib/mdex/slackconverter.ex, renderurl/2 only drops URLs that the dangerous-URL check flags, and escapelinkpart/1 only escapes &, <, > and |.
This issue affects mdex: from 0.13.1 before 0.15.0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
erlang/mdexto a version that resolves this vulnerability.Fixed in 0.15.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.15.0
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using mdex versions from 0.13.1 before 0.15.0 are affected when they forward untrusted Markdown to Slack through MDEx.to_slack/2. Relevant sources include user-generated content, support tickets, and LLM output.
What does an attacker need to exploit it?
An attacker needs the ability to supply Markdown that the application converts with MDEx.to_slack/2 and posts through a Slack bot or integration. They can place Slack control prefixes such as !channel, !here, @U012AB3CD, or !subteam^ID in link, image, or wikilink destinations.
What is the practical impact?
The rendered Slack message can generate channel-wide broadcasts or mention arbitrary users and groups under the posting bot's message. Plain-text occurrences of these sequences are escaped, but occurrences in the affected destination fields are not.
How can I identify potentially affected content or code paths?
Look for application paths that pass externally influenced Markdown into MDEx.to_slack/2 before sending the output to Slack. Test link, image, and wikilink destinations containing Slack control values and check whether the rendered output contains forms such as <!channel|label> or <@U012AB3CD|label>.