Page MenuHomePhabricator

CVE-2026-0669: Path Traversal vulnerability in CSS extension on certain web servers
Closed, ResolvedPublicSecurity

Description

Forward-slashes can be represented by %2F in URIs and web servers like NGINX normalise it by default (while others others like Apache also support it when configured).
To use the example PoC provided in T369486, this would successfully load on such a server:

{{#css: /..%2Findex.php?title=CSS/Path traversal/styles.css&action=raw&ctype=text/css}}<!--
--><div class="purple"></div>

Again, backward-slashes can be represented by %5c so this would work, too, on some servers (the patch for T369486 was incomplete):

{{#css: /..%5cindex.php?title=CSS/Path traversal/styles.css&action=raw&ctype=text/css}}<!--
--><div class="purple"></div>

This behaviour is less common as far as I can see.

Event Timeline

Redmin added subscribers: BlankEclair, Nad, GICodeWarrior.

The easiest (but obviously 'hackiest') solution would be to just normalise these in the extension.

As this extension isn't bundled or Wikimedia-deployed, an eventual security patch can just go through gerrit.

Change #1194575 had a related patch set uploaded (by R4356thwiki; author: R4356thwiki):

[mediawiki/extensions/CSS@master] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1194575

SomeRandomDeveloper renamed this task from Path Traversal vulnerabilty in CSS extension on certain web servers to Path Traversal vulnerability in CSS extension on certain web servers.Oct 18 2025, 1:20 PM

Change #1199050 had a related patch set uploaded (by SomeRandomDeveloper; author: R4356thwiki):

[mediawiki/extensions/CSS@REL1_44] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1199050

Change #1199051 had a related patch set uploaded (by SomeRandomDeveloper; author: R4356thwiki):

[mediawiki/extensions/CSS@REL1_43] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1199051

Change #1194575 merged by jenkins-bot:

[mediawiki/extensions/CSS@master] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1194575

Change #1199053 had a related patch set uploaded (by SomeRandomDeveloper; author: R4356thwiki):

[mediawiki/extensions/CSS@REL1_39] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1199053

Change #1199051 merged by jenkins-bot:

[mediawiki/extensions/CSS@REL1_43] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1199051

Change #1199050 merged by jenkins-bot:

[mediawiki/extensions/CSS@REL1_44] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1199050

Change #1199053 merged by jenkins-bot:

[mediawiki/extensions/CSS@REL1_39] SECURITY: Normalise URL encodings to prevent path traversal

https://gerrit.wikimedia.org/r/1199053

The patches have been merged so I think this can be closed once the Security Team adds this to the tracking task for the next supplemental release announcement.

The patches have been merged so I think this can be closed once the Security Team adds this to the tracking task for the next supplemental release announcement.

Yes, this issue (and its patches) have been added in T404620, which is the supplemental security release that will come out towards the end of December 2025.

The patches have been merged so I think this can be closed once the Security Team adds this to the tracking task for the next supplemental release announcement.

Yes, this issue (and its patches) have been added in T404620, which is the supplemental security release that will come out towards the end of December 2025.

Great, thanks.

mmartorana renamed this task from Path Traversal vulnerability in CSS extension on certain web servers to CVE-2026-0669: Path Traversal vulnerability in CSS extension on certain web servers.Jan 7 2026, 5:47 PM
mmartorana changed the visibility from "Custom Policy" to "Public (No Login Required)".Jan 9 2026, 2:49 PM
mmartorana changed the edit policy from "Custom Policy" to "All Users".