Page MenuHomePhabricator

Symfony Twig - Sandbox Information Disclosure (iegreview, wikimania-scholarships, slimapp)
Closed, ResolvedPublic

Description

php-composer-security-docker keeps spamming the Security-Team with this (low) vulnerability for three apps:

We can split these into separate tasks, but since the solution requires version-bumping twig in composer.json, I thought we could possibly take care of these in one fell swoop. Additionally, this vulnerability specifically affects apps running twig in sandbox mode, which I don't believe any of these apps do. Though we still get automated alerts for them :/

The issue was fixed in twig 1.38 and testing locally, php security checker doesn't complain with "twig/twig": "~1.38". I would've pushed some patch sets up to gerrit for each of these, but couldn't get the unit tests to run locally, so I held off.

Event Timeline

Update: I've got some (hopefully nondescript) patches up on gerrit for iegreview and wikimania-scholarships, as noted within the description.

T243037: Shutdown scholarships.wikimedia.org and archive project will take care of wikimania-scholarships :(

I think there are still a lot of questions there, re: the new solution, but if we can assume the current app is absolutely going away, then I can abandon the related patch. Though if it isn't too much trouble, it might be nice to just merge it so the Security-Team no longer receives any obnoxious alerts :) Failing that, I might just remove it from php-composer-security-docker.

sbassett updated the task description. (Show Details)
sbassett removed a project: Patch-For-Review.
sbassett moved this task from Back Orders to Our Part Is Done on the Security-Team board.

I think everything is updated and merged for these now. Not sure if the patches auto-deploy post-merge in gerrit or if a manual deploy is still required, but confirmation or execution of that step would be all that was needed to resolve and make this task public.

I think everything is updated and merged for these now. Not sure if the patches auto-deploy post-merge in gerrit or if a manual deploy is still required, but confirmation or execution of that step would be all that was needed to resolve and make this task public.

Manual scap3 deploys are needed to change the live sites. I think they are both hosted on ganneti vms with a PHP 5.6 runtime too, so the deploys may not go as hoped if that was not taken into account when building the vendor components.

sbassett changed the task status from Open to Stalled.Feb 20 2020, 9:37 PM

Manual scap3 deploys are needed to change the live sites. I think they are both hosted on ganneti vms with a PHP 5.6 runtime too, so the deploys may not go as hoped if that was not taken into account when building the vendor components.

I'm guessing a PHP upgrade on the ganeti clusters is probably both non-trivial and de-prioritized at the moment. I think it makes sense to mark this task stalled and keep it security-protected until either iegreview and wikimania-scholarships are officially undeployed or the cluster is upgraded.

wikimania-scholarships is in the process of being removed. the general public can't access it anymore. you can remove it from the list here

wikimania-scholarships is in the process of being removed. the general public can't access it anymore. you can remove it from the list here

Done. For the other two, the mitigations were merged but I don't know if they were ever deployed.

I think they are both hosted on ganneti vms with a PHP 5.6 runtime

[miscweb1002:~] $ php -v
PHP 7.3.29-1~deb10u1 (cli) (built: Jul 2 2021 04:04:33) ( NTS )

I'm guessing a PHP upgrade on the ganeti clusters is probably both non-trivial and de-prioritized at the moment. I think it makes sense to mark this task stalled and keep it security-protected until either iegreview and wikimania-scholarships are officially undeployed or the cluster is upgraded.

well, unstalled since quite some time then :)

For the other two, the mitigations were merged but I don't know if they were ever deployed.

I spot checked iegreview (patch https://gerrit.wikimedia.org/r/c/wikimedia/iegreview/+/571823). compared against what is deployed on prod.

The patch changes "wikimedia/slimapp": from 0.9.0 to "0.9.2". In prod this file already says 1.20.0.

Also [miscweb2002:/srv/deployment/iegreview/iegreview/vendor/twig/twig] $ vi CHANGELOG is at 1.20.0

sbassett assigned this task to bd808.
sbassett updated the task description. (Show Details)

I spot checked iegreview (patch https://gerrit.wikimedia.org/r/c/wikimedia/iegreview/+/571823). compared against what is deployed on prod.

The patch changes "wikimedia/slimapp": from 0.9.0 to "0.9.2". In prod this file already says 1.20.0.

Also [miscweb2002:/srv/deployment/iegreview/iegreview/vendor/twig/twig] $ vi CHANGELOG is at 1.20.0

Great. I'm just going to resolve and disclose this then. slimapp is just a framework anyways, and not actually a deployed app AFAIK.

sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett edited subscribers, added: Mstyles, mmartorana; removed: AlexWang.

cool:) yes, iegreview and scholarships were actually installed apps/sites but slimapp is a framework used by them afaict