{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-136268","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","state":"PUBLISHED","assignerShortName":"EEF","dateReserved":"2026-11-30T16:55:56.400Z","datePublished":"2026-11-30T18:43:53.309Z","dateUpdated":"2026-11-30T18:43:53.309Z"},"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.MDEx.SlackConverter'","'Elixir.MDEx'"],"packageName":"mdex","packageURL":"pkg:hex/mdex","product":"mdex","programFiles":["lib/mdex/slack_converter.ex","lib/mdex.ex"],"programRoutines":[{"name":"'Elixir.MDEx.SlackConverter':convert/2"},{"name":"'Elixir.MDEx':to_slack/2"},{"name":"'Elixir.MDEx':to_slack!/2"}],"repo":"https://github.com/leandrocp/mdex","vendor":"leandrocp","versions":[{"lessThan":"0.15.0","status":"affected","version":"0.13.1","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.MDEx.SlackConverter'","'Elixir.MDEx'"],"packageName":"leandrocp/mdex","packageURL":"pkg:github/leandrocp/mdex","product":"mdex","programFiles":["lib/mdex/slack_converter.ex","lib/mdex.ex"],"programRoutines":[{"name":"'Elixir.MDEx.SlackConverter':convert/2"},{"name":"'Elixir.MDEx':to_slack/2"},{"name":"'Elixir.MDEx':to_slack!/2"}],"repo":"https://github.com/leandrocp/mdex","vendor":"leandrocp","versions":[{"lessThan":"22a0c7b6614f84648e72699f3e426f20b7f04ba6","status":"affected","version":"0be090a78dbe587a90814a7481b039d10996863c","versionType":"git"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*","versionEndExcluding":"0.15.0","versionStartIncluding":"0.13.1","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"reporter","value":"Peter Ullrich"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation developer","value":"Leandro Pereira"}],"dateAssigned":"2026-11-30T16:56:01.000Z","datePublic":"2026-11-30T18:43:52.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in leandrocp mdex allows Content Spoofing via code block content passed to <code>MDEx.to_slack/2</code>. An attacker who controls Markdown that an application converts to Slack mrkdwn can inject <code>&lt;!channel&gt;</code>, <code>&lt;!here&gt;</code> and <code>&lt;@user&gt;</code> mentions and links whose visible label differs from their target, with default options.</p>\n<p>In <code>lib/mdex/slack_converter.ex</code>, the <code>MDEx.CodeBlock</code> clause of <code>render_node/2</code> 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 <code>render_url/2</code>.</p>\n<p>This issue affects mdex: from 0.13.1 before 0.15.0.</p>"},{"base64":false,"type":"text/markdown","value":"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.\n\nIn `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`.\n\nThis issue affects mdex: from 0.13.1 before 0.15.0."}],"value":"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.\n\nIn 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.\n\nThis issue affects mdex: from 0.13.1 before 0.15.0."}],"impacts":[{"capecId":"CAPEC-148","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"LOCAL","baseScore":5.1,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"LOW","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-150","description":"CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF","dateUpdated":"2026-11-30T18:43:53.309Z"},"references":[{"name":"EEF CNA record for CVE-2026-136268","tags":["related","third-party-advisory"],"url":"https://cna.erlef.org/cves/CVE-2026-136268.html"},{"name":"OSV record EEF-CVE-2026-136268","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-136268"},{"name":"Introducing commit 0be090a in leandrocp/mdex","tags":["related"],"url":"https://github.com/leandrocp/mdex/commit/0be090a78dbe587a90814a7481b039d10996863c"},{"name":"Fix commit 22a0c7b in leandrocp/mdex","tags":["patch"],"url":"https://github.com/leandrocp/mdex/commit/22a0c7b6614f84648e72699f3e426f20b7f04ba6"}],"source":{"discovery":"INTERNAL"},"title":"Code block fence breakout in MDEx to_slack/2 allows Slack mention and link injection","x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Supply Markdown that opens a code block with four backticks, has a line of three backticks as its first body line, then the line <code>&lt;!channel&gt; &lt;https://evil.example|https://trusted.example&gt;</code>, and closes with four backticks.</li>\n<li>Convert it with <code>MDEx.to_slack/2</code> using default options.</li>\n<li>Observe that the output's code block ends at the inner three-backtick line and the following line keeps <code>&lt;!channel&gt;</code> and the label-spoofed link unescaped outside any code block, while a plain-text <code>&lt;!channel&gt;</code> elsewhere in the same input is escaped to <code>&amp;lt;!channel&amp;gt;</code>.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"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.\n2. Convert it with `MDEx.to_slack/2` using default options.\n3. 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;`."}],"value":"* 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.\n* Convert it with MDEx.to_slack/2 using default options.\n* 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;."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. Input handling.</strong> <code>MDEx.to_slack/2</code> parses the Markdown and passes the document to <code>MDEx.SlackConverter.convert/2</code>, which renders each node. Text, inline code and link labels go through <code>escape_text/1</code>, which encodes <code>&amp;</code>, <code>&lt;</code> and <code>&gt;</code>.</p>\n<p><strong>2. Unsafe processing.</strong> The <code>MDEx.CodeBlock</code> clause of <code>render_node/2</code> emits the block literal unchanged between a fixed opening and closing three-backtick fence. CommonMark lets a block opened with four backticks or <code>~~~</code> contain a line of three backticks, so that line reaches the output intact.</p>\n<p><strong>3. Effect in Slack.</strong> 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 <code>&lt;!channel&gt;</code> and links such as <code>&lt;https://evil.example|https://trusted.example&gt;</code> become live, while the same text outside a code block is escaped. Injected links never pass through <code>render_url/2</code>, so its dangerous URL check does not apply.</p>"},{"base64":false,"type":"text/markdown","value":"**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 `>`.\n\n**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.\n\n**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."}],"value":"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 >.\n\n2. 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.\n\n3. 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."}]}}}