{"id":"UBUNTU-CVE-2021-30159","details":"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.","modified":"2026-05-27T10:15:20.634555699Z","published":"2021-04-09T07:15:00Z","upstream":["CVE-2021-30159"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-30159"},{"type":"REPORT","url":"https://phabricator.wikimedia.org/T272386"},{"type":"REPORT","url":"https://lists.wikimedia.org/pipermail/wikitech-l/2021-April/094418.html"},{"type":"REPORT","url":"https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/49ce7dd2143d01cffd4dfd2f2af79b2b93672eac%5E%21/"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-30159"}],"affected":[{"package":{"name":"mediawiki","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/mediawiki?arch=source&distro=esm-apps%2Ffocal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1:1.31.2-1ubuntu1","1:1.31.5-1","1:1.31.5-1ubuntu1","1:1.31.5-2","1:1.31.5-3","1:1.31.5-3ubuntu1","1:1.31.6-1","1:1.31.7-1","1:1.31.7-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"1:1.31.7-1ubuntu0.1~esm1","binary_name":"mediawiki"},{"binary_version":"1:1.31.7-1ubuntu0.1~esm1","binary_name":"mediawiki-classes"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-30159.json"}},{"package":{"name":"mediawiki","ecosystem":"Ubuntu:Pro:22.04:LTS","purl":"pkg:deb/ubuntu/mediawiki?arch=source&distro=esm-apps%2Fjammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1:1.35.3-1","1:1.35.4-1","1:1.35.5-1","1:1.35.5-1ubuntu1","1:1.35.5-1ubuntu2","1:1.35.5-1ubuntu3","1:1.35.6-1","1:1.35.6-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_name":"mediawiki","binary_version":"1:1.35.6-1ubuntu0.1~esm1"},{"binary_version":"1:1.35.6-1ubuntu0.1~esm1","binary_name":"mediawiki-classes"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-30159.json"}},{"package":{"name":"mediawiki","ecosystem":"Ubuntu:Pro:24.04:LTS","purl":"pkg:deb/ubuntu/mediawiki?arch=source&distro=esm-apps%2Fnoble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1:1.39.4-2","1:1.39.5-1","1:1.39.6-1","1:1.39.7-1","1:1.39.7-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"1:1.39.7-1ubuntu0.1~esm1","binary_name":"mediawiki"},{"binary_name":"mediawiki-classes","binary_version":"1:1.39.7-1ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-30159.json"}},{"package":{"name":"mediawiki","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/mediawiki?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1:1.43.1+dfsg-1","1:1.43.1+dfsg-2","1:1.43.3+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"mediawiki","binary_version":"1:1.43.3+dfsg-1"},{"binary_version":"1:1.43.3+dfsg-1","binary_name":"mediawiki-classes"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-30159.json"}},{"package":{"name":"mediawiki","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/mediawiki?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1:1.43.3+dfsg-1","1:1.43.5+dfsg-1","1:1.43.6+dfsg-2","1:1.43.8+dfsg-1","1:1.43.8+dfsg-2"],"ecosystem_specific":{"binaries":[{"binary_name":"mediawiki","binary_version":"1:1.43.8+dfsg-2"},{"binary_version":"1:1.43.8+dfsg-2","binary_name":"mediawiki-classes"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-30159.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"},{"type":"Ubuntu","score":"medium"}]}