CVE-2026-136268: Code block fence breakout in MDEx to_slack/2 allows Slack mention and link injection

Published Nov 30, 2026
·
Updated

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in leandrocp mdex allows Content Spoofing via code block content passed to MDEx.toslack/2. An attacker who controls Markdown that an application converts to Slack mrkdwn can inject <!channel>, <!here> and <@user> mentions and links whose visible label differs from their target, with default options.

In lib/mdex/slackconverter.ex, the MDEx.CodeBlock clause of rendernode/2 wraps the block's literal in a fixed three-backtick fence and emits it without the escaping applied to every other text node. A block opened with four backticks or tildes whose body contains a line of three backticks therefore closes the Slack code block early, and the rest of the body is parsed as live mrkdwn. Links injected this way also skip the dangerous URL filter in renderurl/2.

This issue affects mdex: from 0.13.1 before 0.15.0.

Affected Software

1 affected component
hex/mdex>=0.13.1<0.15.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade mdex to a version that resolves this vulnerability.

    Fixed in 0.15.0

Event History

Nov 30, 2026
CVE Published
via MITRE·06:43 PM
Data Sourced
via MITRE·06:43 PM
DescriptionWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using mdex versions 0.13.1 through versions before 0.15.0 are affected when they pass attacker-controlled Markdown to MDEx.to_slack/2. The vulnerable behavior occurs with default options.

2

What must an attacker control to exploit it?

The attacker must be able to supply Markdown that the application converts into Slack mrkdwn with MDEx.to_slack/2. A code block opened with four backticks or tildes can include a line containing three backticks, ending the generated Slack code fence early and causing following content to be interpreted as live mrkdwn.

3

What can the injected Slack content do?

It can inject <!channel>, <!here>, and <@user> mentions, potentially notifying users or channels. It can also inject links whose displayed label differs from their destination, and those links bypass the dangerous URL filtering applied by render_url/2.

4

How can I determine whether my deployment is affected?

Check whether your dependency version is at least 0.13.1 and earlier than 0.15.0, and whether untrusted Markdown is converted through MDEx.to_slack/2. Testing a four-backtick or tilde-delimited code block containing a standalone three-backtick line can reveal whether content after that line is emitted as active Slack mrkdwn.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203