Medium severity4.3NVD Advisory· Published May 7, 2026· Updated May 11, 2026
CVE-2026-44264
CVE-2026-44264
Description
Weblate is a web based localization tool. Prior to version 5.17.1, the Markdown renderer used in user comments and other user-provided content didn't properly sanitize some attributes. This issue has been patched in version 5.17.1.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
weblatePyPI | < 5.17.1 | 5.17.1 |
Affected products
1Patches
185abc9df88b7fix(utils): correctly escape image target in markdown
3 files changed · +24 −3
docs/changes.rst+1 −0 modified@@ -62,6 +62,7 @@ Weblate 5.17.1 * The missing file-mask matches :ref:`alert <alerts>` is now restored after rescans that leave only the source translation. * Automatic translation from other components now ignores read-only source candidates with empty translations. * Markdown rendering now falls back to escaped plain text when the Markdown parser fails. +* Markdown image URLs are now escaped before rendering. .. rubric:: Compatibility
weblate/utils/markdown.py+6 −1 modified@@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import annotations +import html import re from functools import reduce @@ -117,7 +118,11 @@ def render_image(self, token: span_token.Image) -> str: Otherwise, escape the URL. """ if self.check_url(token.src): - return super().render_image(token) + template = '<img src="{}" alt="{}"{} />' + title = f' title="{html.escape(token.title)}"' if token.title else "" + return template.format( + self.escape_url(token.src), self.render_to_plain(token), title + ) return self.escape_html_text(f"") def check_url(self, url: str) -> bool:
weblate/utils/tests/test_markdown.py+17 −2 modified@@ -4,19 +4,24 @@ from unittest.mock import patch -from django.test import TestCase +from django.test import SimpleTestCase, TestCase from weblate.auth.models import User from weblate.utils.markdown import get_mention_users, render_markdown -class MarkdownTestCase(TestCase): +class MarkdownTestCase(SimpleTestCase): def test_link(self) -> None: self.assertEqual( '<p><a rel="ugc" target="_blank" ' 'href="https://weblate.org/">link</a></p>\n', render_markdown("[link](https://weblate.org/)"), ) + self.assertEqual( + '<p><a rel="ugc" target="_blank" href="https://e.com/%22%20' + 'onclick=%22alert(1)">link</a></p>\n', + render_markdown('[link](<https://e.com/" onclick="alert(1)>)'), + ) def test_js(self) -> None: self.assertEqual( @@ -121,6 +126,16 @@ def test_image(self) -> None: '<p><img src="https://valid.link" alt="title" /></p>\n', render_markdown(""), ) + self.assertEqual( + '<p><img src="https://e.com/%22%20onerror=%22alert(1)" ' + 'alt="title" /></p>\n', + render_markdown('>)'), + ) + self.assertEqual( + '<p><img src="https://valid.link" alt="ti "tle" ' + 'title="quot"ed" /></p>\n', + render_markdown(""), + ) self.assertEqual( "<p></p>\n", render_markdown(""),
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/WeblateOrg/weblate/commit/85abc9df88b7464f4c0e794aef752e45f4230f75nvdPatchWEB
- github.com/WeblateOrg/weblate/pull/19259nvdIssue TrackingPatchWEB
- github.com/WeblateOrg/weblate/security/advisories/GHSA-5cmv-3rc4-7279nvdPatchVendor AdvisoryWEB
- github.com/advisories/GHSA-5cmv-3rc4-7279ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-44264ghsaADVISORY
- github.com/WeblateOrg/weblate/releases/tag/weblate-5.17.1nvdRelease NotesWEB
News mentions
0No linked articles in our index yet.