Flow is in read only mode, but makes use of Handlebars to do client side rendering. We are using an outdated version with known security vulnerabilities.
- https://gerrit.wikimedia.org/g/mediawiki/extensions/Flow/+/344bf17c9e54fd21364f954247187d46a538d4b1/extension.json#377
- https://security.snyk.io/package/npm/handlebars/3.0.0
A quick check on www.mediawiki.org shows one of the vulnerabilities mentioned:
mw.loader.using('mediawiki.template.handlebars').then(()=> {
var s2 = `<div>template that looks fine but hidden inside the long string is some JS code that might not be eaily seen by the human eye during a casual glance. Sometimes wiki interface admins turn on gadgets with very little code review, maybe only testing it does what it says it does but not looking at what it might be doing in the background</div>{{'a/.") || alert("Handlebars JS when compiling in compat mode'}}<span>things could easily be sneaked in.</div>`;
var template = Handlebars.compile(s2, {
compat: true
});
console.log(template({}))
} );I don't think we use compat mode, and at a glance we are probably okay for deployed code, but I suspect its worth evaluating the other known security issues to see if they apply.
I suspect surface vector is low, since Flow is not enabled on all wikis. Flow does render messages as HTML for example flow-compare-revisions-header-post.
The most likely use of these vectors from what I can see is it could be used to obscure an attack e.g. adding some code to a wiki page and then executing it indirectly through Handlebars but that would require edit access to the gadget namespace.