Page MenuHomePhabricator

Bundled pygments in REL1_31 / REL1_35 vulnerable to CVE-2021-20270 and CVE-2021-27291
Closed, ResolvedPublicSecurity

Event Timeline

Given that REL1_31 is on such an old version I think we could just disable sml rather than risk a bunch of potentially breaking changes.

It it's OK with the security team I think we should do the REL1_35 version bump in Gerrit since binary patch files are pretty annoying.

Given that REL1_31 is on such an old version I think we could just disable sml rather than risk a bunch of potentially breaking changes.

Probably the lowest risk option if it won't degrade any functionality.

It it's OK with the security team I think we should do the REL1_35 version bump in Gerrit since binary patch files are pretty annoying.

I'd rate this low risk if we can get it merged prior to the upcoming security release, unless @Reedy has other concerns.

It it's OK with the security team I think we should do the REL1_35 version bump in Gerrit since binary patch files are pretty annoying.

I'd rate this low risk if we can get it merged prior to the upcoming security release, unless @Reedy has other concerns.

Indeed. The upstream task is public, it has a CVE attached, so it's obvious there's a security component to the bug, and basically a simple replication criteria in the task too.

Therefore pushing fixes in public (to the extension/branches) for dealing with it does highlight the issue a bit, but I don't think it's a major concern. Fix should be released more formally in the next couple of weeks anyway for T270458: Release MediaWiki 1.31.13/1.35.2

REL1_31:


REL1_35: https://gerrit.wikimedia.org/r/670552

So for REL1_35, 2.7.4 is the minimum safe version to address the sml CVE? Just wondering if there was any other reason not to bump to 2.8.0 like master.

So for REL1_35, 2.7.4 is the minimum safe version to address the sml CVE? Just wondering if there was any other reason not to bump to 2.8.0 like master.

Yes. Mostly just to minimize the amount of changes in a stable branch. Based on https://pygments.org/docs/changelog/#version-2-8-0 it looks like upstream did a lot of internal refactoring in this release, and we really haven't run it in production for that long yet. They also just released 2.8.1 a few days ago so... I think 2.7.4 is just the more conservative option.

sbassett moved this task from Incoming to Watching on the Security-Team board.
MoritzMuehlenhoff renamed this task from Bundled pygments in REL1_31 / REL1_35 vulnerable to CVE-2021-20270 to Bundled pygments in REL1_31 / REL1_35 vulnerable to CVE-2021-20270 and CVE-2021-27291.Mar 22 2021, 10:49 AM
MoritzMuehlenhoff updated the task description. (Show Details)

Ack. Here's a new patch that also disables those vulnerable lexers

Ack. Here's a new patch that also disables those vulnerable lexers

Is that just for REL1_31?

Ack. Here's a new patch that also disables those vulnerable lexers

Is that just for REL1_31?

Yes. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SyntaxHighlight_GeSHi/+/670552 is the fix for REL1_35

Change 678024 had a related patch set uploaded (by Reedy; author: Legoktm):

[mediawiki/extensions/SyntaxHighlight_GeSHi@REL1_31] SECURITY: Disable various lexers because of DoS attacks

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

Change 678024 merged by jenkins-bot:

[mediawiki/extensions/SyntaxHighlight_GeSHi@REL1_31] SECURITY: Disable various lexers because of DoS attacks

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

Reedy changed the visibility from "Custom Policy" to "Public (No Login Required)".Apr 8 2021, 9:09 PM
Reedy changed the edit policy from "Custom Policy" to "All Users".