EEF-CVE-2026-136268

Source
https://cna.erlef.org/osv/EEF-CVE-2026-136268.html
Import Source
https://cna.erlef.org/osv/EEF-CVE-2026-136268.json
JSON Data
https://api.osv.dev/v1/vulns/EEF-CVE-2026-136268
Aliases
  • CVE-2026-136268
Published
2026-11-30T18:43:53Z
Modified
2026-11-30T18:45:05Z
Severity
  • 5.1 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N (Source: CNA) CVSS Calculator
Summary
Code block fence breakout in MDEx to_slack/2 allows Slack mention and link injection
Details

Summary

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in leandrocp mdex allows Content Spoofing via code block content passed to MDEx.to_slack/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/slack_converter.ex, the MDEx.CodeBlock clause of render_node/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 render_url/2.

This issue affects mdex: from 0.13.1 before 0.15.0.

Details

1. Input handling. MDEx.to_slack/2 parses the Markdown and passes the document to MDEx.SlackConverter.convert/2, which renders each node. Text, inline code and link labels go through escape_text/1, which encodes &, < and >.

2. Unsafe processing. The MDEx.CodeBlock clause of render_node/2 emits the block literal unchanged between a fixed opening and closing three-backtick fence. CommonMark lets a block opened with four backticks or ~~~ contain a line of three backticks, so that line reaches the output intact.

3. Effect in Slack. Slack ends a code block at the next three backticks, so the inner line closes the fence and the remaining body is parsed as mrkdwn. Mention tokens such as <!channel> and links such as <https://evil.example|https://trusted.example> become live, while the same text outside a code block is escaped. Injected links never pass through render_url/2, so its dangerous URL check does not apply.

Proof of concept

  1. Supply Markdown that opens a code block with four backticks, has a line of three backticks as its first body line, then the line <!channel> <https://evil.example|https://trusted.example>, and closes with four backticks.
  2. Convert it with MDEx.to_slack/2 using default options.
  3. Observe that the output's code block ends at the inner three-backtick line and the following line keeps <!channel> and the label-spoofed link unescaped outside any code block, while a plain-text <!channel> elsewhere in the same input is escaped to &lt;!channel&gt;.

Impact

An attacker who can submit Markdown that an application forwards to Slack can trigger channel-wide or per-user notifications and post links whose visible label shows a trusted URL while pointing elsewhere, in messages that appear to come from the application.

Database specific
{
    "$schema":  "https://cna.erlef.org/schemas/osv/record-0.1.0.json",
    "capec_ids":  [
        "CAPEC-148"
    ],
    "cpe_ids":  [
        "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"
    ],
    "cwe_ids":  [
        "CWE-150"
    ]
}
References
Credits
    • Peter Ullrich - FINDER
    • Peter Ullrich - REPORTER
    • Jonatan Männchen / EEF - ANALYST
    • Leandro Pereira - REMEDIATION_DEVELOPER

Affected packages

Hex / mdex

Package

Name
mdex
Purl
pkg:hex/mdex

Affected ranges

Type
SEMVER
Events
Introduced
0.13.1
Fixed
0.15.0

Affected versions

0.*
0.13.1
0.13.2
0.13.3
0.13.4
0.13.5
0.14.0
0.14.1
0.14.2
0.14.3
0.14.4
0.14.5
0.14.6
0.14.7
0.14.8
0.14.9

Ecosystem specific

{
    "$schema":  "https://cna.erlef.org/schemas/osv/affected-0.1.0.json",
    "modules":  [
        "'Elixir.MDEx.SlackConverter'",
        "'Elixir.MDEx'"
    ],
    "program_files":  [
        "lib/mdex/slack_converter.ex",
        "lib/mdex.ex"
    ],
    "program_routines":  [
        "'Elixir.MDEx.SlackConverter':convert/2",
        "'Elixir.MDEx':to_slack/2",
        "'Elixir.MDEx':to_slack!/2"
    ]
}

Database specific

$schema
"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"
modules
[
    "'Elixir.MDEx.SlackConverter'",
    "'Elixir.MDEx'"
]
program_files
[
    "lib/mdex/slack_converter.ex",
    "lib/mdex.ex"
]
program_routines
[
    "'Elixir.MDEx.SlackConverter':convert/2",
    "'Elixir.MDEx':to_slack/2",
    "'Elixir.MDEx':to_slack!/2"
]
source
"https://cna.erlef.org/osv/EEF-CVE-2026-136268.json"

Git / github.com/leandrocp/mdex

Affected ranges

Type
GIT
Repo
https://github.com/leandrocp/mdex
Events

Affected versions

v0.*
v0.13.1
v0.13.2
v0.13.3
v0.13.4
v0.13.5
v0.14.0
v0.14.1
v0.14.2
v0.14.3
v0.14.4
v0.14.5
v0.14.6
v0.14.7
v0.14.8
v0.14.9

Database specific

$schema
"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"
modules
[
    "'Elixir.MDEx.SlackConverter'",
    "'Elixir.MDEx'"
]
program_files
[
    "lib/mdex/slack_converter.ex",
    "lib/mdex.ex"
]
program_routines
[
    "'Elixir.MDEx.SlackConverter':convert/2",
    "'Elixir.MDEx':to_slack/2",
    "'Elixir.MDEx':to_slack!/2"
]
source
"https://cna.erlef.org/osv/EEF-CVE-2026-136268.json"