CVE-2021-30159
JSON

4.3medium

An issue was discovered in MediaWiki before 1.31.12 and 1.32.x through 1.35.x before 1.35.2.

Severity
4.3medium CVSS:3.1 by NVD
Exploit likelihood
1.52% (higher than 75% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
BIT-MEDIAWIKI-2021-30159

Description

An issue was discovered in MediaWiki before 1.31.12 and 1.32.x through 1.35.x before 1.35.2. Users can bypass intended restrictions on deleting pages in certain "fast double move" situations. MovePage::isValidMoveTarget() uses FOR UPDATE, but it's only called if Title::getArticleID() returns non-zero with no special flags. Next, MovePage::moveToInternal() will delete the page if getArticleID(READ_LATEST) is non-zero. Therefore, if the page is missing in the replica DB, isValidMove() will return true, and then moveToInternal() will unconditionally delete the page if it can be found in the master.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
mediawiki mediawikibefore 1.31.12, from 1.32.0 before 1.35.2NVD
debian debian_linux9.0, 10.0NVD
fedoraproject fedora33, 34NVD
mediawiki (Bitnami)before 1.31.12, from 1.32.0 before 1.35.2Bitnami Vulnerability Database

All scores

NVD4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:N/I:P/A:N
Bitnami Vulnerability Databasemedium rating

What each source says

CVE List

An issue was discovered in MediaWiki before 1.31.12 and 1.32.x through 1.35.x before 1.35.2. Users can bypass intended restrictions on deleting pages in certain "fast double move" situations. MovePage::isValidMoveTarget() uses FOR UPDATE, but it's only called if Title::getArticleID() returns non-zero with no special flags. Next, MovePage::moveToInternal() will delete the page if getArticleID(READ_LATEST) is non-zero. Therefore, if the page is missing in the replica DB, isValidMove() will return true, and then moveToInternal() will unconditionally delete the page if it can be found in the master.

NVD (es)

Se detectó un problema en MediaWiki versiones anteriores a 1.31.12 y versiones 1.32.x hasta 1.35.x versiones anteriores a 1.35.2. Unos usuarios pueden omitir unas restricciones previstas sobre la eliminación de páginas en determinadas situaciones de "fast double move". La función MovePage::isValidMoveTarget() usa FOR UPDATE, pero solo es llamada si la función Title::getArticleID() devuelve un valor distinto de cero sin indicadores especiales. A continuación, MovePage::moveToInternal() eliminará la página si getArticleID(READ_LATEST) no es cero. Por lo tanto, si la página falta en la réplica de la base de datos, la función isValidMove() devolverá verdadero, y luego moveToInternal() eliminará incondicionalmente la página si se puede encontrar en el maestro

References

https://phabricator.wikimedia.org/T272386exploit, patch, vendor-advisory, web
https://www.debian.org/security/2021/dsa-4889third-party-advisory, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/26UJGHF7LJDOCQN6A3Z4PM7PYRKENJHE/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2OMSV7B2TCFBOCICN3B4SMQP5HVRJQIT/vendor-advisory, web
https://lists.debian.org/debian-lts-announce/2021/05/msg00003.htmlmailing-list, third-party-advisory, web
https://lists.debian.org/debian-lts-announce/2021/05/msg00006.htmlmailing-list, third-party-advisory, web
https://security.gentoo.org/glsa/202107-40third-party-advisory, vendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-30159web

Sources

SourceRecordLicence
CVE ListCVE-2021-30159 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-30159 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-MEDIAWIKI-2021-30159 changed 2025-04-03Apache-2.0