Newsletters 0.1.5: Security fix for newsletter Markdown
Newsletters 0.1.5 is a security release. Broadcasts are written in Markdown, and the library that turned them into HTML, Earmark, is retired and has a stored cross-site scripting flaw (EEF-CVE-2026-48591): attribute values in HTML were not escaped.
The module now uses MDEx, the Markdown library PhoenixKit core uses, and every newsletter’s HTML is passed through core’s HTML sanitizer before it is previewed or sent. A broadcast goes to every list member by email, not only to trusted admins, so the sanitizing always runs. If the Markdown cannot be read, the text is sent escaped instead.
The module’s tables now also follow core’s database schema prefix setting, and the list editor’s checkbox uses core’s checkbox component.
Upgrading
Newsletters 0.1.5 needs PhoenixKit core 1.7.189 or later. MDEx uses a native library; the module adds an optional rustler dependency so it can be built from source on a host where no prebuilt version matches.
Full release notes: Newsletters 0.1.5
0.1.5 · 13 July 2026
Security
- Replaced Earmark (retired,
EEF-CVE-2026-48591— stored XSS via unescaped HTML attribute values) with MDEx for markdown-to-HTML rendering inContent.render_markdown/1andrender_markdown_strict/1. Output now also runs throughPhoenixKit.Utils.HtmlSanitizer.sanitize/1— newsletter HTML goes out to every list member by email, not just a trusted-admin preview, so it’s sanitized unconditionally.
Changed
earmarkdependency replaced withmdex ~> 0.13(matchesphoenix_kitcore andphoenix_kit_publishing), plus an optionalrustlerpin so the transitivemdex_nativeNIF can source-build on hosts whose precompiled variant doesn’t match.render_markdown_strict/1‘s error branch now returns{:error, reason}(anMDEx.DecodeError/MDEx.InvalidInputErrorstruct) instead of Earmark’s list of error tuples; no in-repo caller pattern-matched the previous shape.
Fixed
- Loosened the
phoenix_kitdependency back to~> 1.7 and >= 1.7.189— a prior commit had tightened it to~> 1.7.189, which caps consumers below1.8.0; the floor-with-open-ceiling form keeps the runtime schema-prefix requirement without blocking future minor releases. - Added
.dialyzer_ignore.exs(and wired it intomix.exs) for the known upstreamGettext.Backend/Expo.PluralFormscall_without_opaquefalse positive, matching every otherphoenix_kit_*package —mix precommitwas failing dialyzer without it.
Newsletters 0.1.5. Install or update: {:phoenix_kit_newsletters, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.