Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-42040

An issue was discovered in MediaWiki through 1.36.2. A parser function related to loop control allowed for an infinite loop (and php-fpm hang) within the Loops extension because egLoopsCountLimit is mishandled. This could lead to memory exhaustion.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-42040
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 05:09 UTC · Revision 1

Source evidence

CVE-2021-42040

core-osv · Original source

Published 6 Oct 2021, 21:15 UTC

An issue was discovered in MediaWiki through 1.36.2. A parser function related to loop control allowed for an infinite loop (and php-fpm hang) within the Loops extension because egLoopsCountLimit is mishandled. This could lead to memory exhaustion.

osv:CVE-2021-42040
Complete source record
{
  "id": "e2ef1898557719bbfbee7149832d7ff6b64013f12b950481fc8b51f997389d7c",
  "url": "https://osv.dev/vulnerability/CVE-2021-42040",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-42040",
    "summary": "An issue was discovered in MediaWiki through 1.36.2. A parser function related to loop control allowed for an infinite loop (and php-fpm hang) within the Loops extension because egLoopsCountLimit is mishandled. This could lead to memory exhaustion.",
    "evidence": "osv:CVE-2021-42040",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-42040",
      "aliases": [
        "BIT-mediawiki-2021-42040",
        "CVE-2021-42040"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/wikimedia/mediawiki",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "f65f9d6971578b301ef9fc915a729e6a13266a5e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:mediawiki:mediawiki:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.36.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.36.2",
            "1.36.1",
            "1.36.0",
            "1.36.0-rc.0",
            "test-hashar-for-ci",
            "1.6.0",
            "1.5.0beta4",
            "1.5.0beta3",
            "1.5.0beta2",
            "1.5.0beta1",
            "1.5.0alpha2",
            "1.5.0alpha1",
            "1.3.0beta1",
            "1.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-42040.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:25.173600418Z",
      "provider": "osv",
      "references": [
        "https://gerrit.wikimedia.org/r/q/I0caf6f129f94612b5bcf406a171aa5ffedea1f80",
        "https://phabricator.wikimedia.org/T287347"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-42040",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 431297,
  "published_at": "2021-10-06T21:15:07.213+00:00"
}