ubuntu-cve-2021-21708
Vulnerability from osv_ubuntu
Published
2021-12-31 00:00
Modified
2026-04-22 07:39
Summary
Details

In PHP versions 7.4.x below 7.4.28, 8.0.x below 8.0.16, and 8.1.x below 8.1.3, when using filter functions with FILTER_VALIDATE_FLOAT filter and min/max limits, if the filter fails, there is a possibility to trigger use of allocated memory after free, which can result it crashes, and potentially in overwrite of other memory chunks and RCE. This issue affects: code that uses FILTER_VALIDATE_FLOAT with min/max limits.


{
  "affected": [
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "libapache2-mod-php7.4",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "libphp7.4-embed",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-bcmath",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-bz2",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-cgi",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-cli",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-common",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-curl",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-dba",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-enchant",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-fpm",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-gd",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-gmp",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-imap",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-interbase",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-intl",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-json",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-ldap",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-mbstring",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-mysql",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-odbc",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-opcache",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-pgsql",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-phpdbg",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-pspell",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-readline",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-snmp",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-soap",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-sqlite3",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-sybase",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-tidy",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-xml",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-xmlrpc",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-xsl",
            "binary_version": "7.4.3-4ubuntu2.9"
          },
          {
            "binary_name": "php7.4-zip",
            "binary_version": "7.4.3-4ubuntu2.9"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:20.04:LTS",
        "name": "php7.4",
        "purl": "pkg:deb/ubuntu/php7.4@7.4.3-4ubuntu2.9?arch=source\u0026distro=focal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "7.4.3-4ubuntu2.9"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "7.4.3-4build1",
        "7.4.3-4build2",
        "7.4.3-4ubuntu1",
        "7.4.3-4ubuntu1.1",
        "7.4.3-4ubuntu2.2",
        "7.4.3-4ubuntu2.4",
        "7.4.3-4ubuntu2.5",
        "7.4.3-4ubuntu2.6",
        "7.4.3-4ubuntu2.7",
        "7.4.3-4ubuntu2.8"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "libapache2-mod-php8.1",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "libphp8.1-embed",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-bcmath",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-bz2",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-cgi",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-cli",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-common",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-curl",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-dba",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-enchant",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-fpm",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-gd",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-gmp",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-imap",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-interbase",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-intl",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-ldap",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-mbstring",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-mysql",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-odbc",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-opcache",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-pgsql",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-phpdbg",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-pspell",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-readline",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-snmp",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-soap",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-sqlite3",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-sybase",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-tidy",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-xml",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-xsl",
            "binary_version": "8.1.2-1ubuntu1"
          },
          {
            "binary_name": "php8.1-zip",
            "binary_version": "8.1.2-1ubuntu1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:22.04:LTS",
        "name": "php8.1",
        "purl": "pkg:deb/ubuntu/php8.1@8.1.2-1ubuntu1?arch=source\u0026distro=jammy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.1.2-1ubuntu1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.1.0~rc4-1ubuntu2",
        "8.1.0-1"
      ]
    }
  ],
  "aliases": [],
  "details": "In PHP versions 7.4.x below 7.4.28, 8.0.x below 8.0.16, and 8.1.x below 8.1.3, when using filter functions with FILTER_VALIDATE_FLOAT filter and min/max limits, if the filter fails, there is a possibility to trigger use of allocated memory after free, which can result it crashes, and potentially in overwrite of other memory chunks and RCE. This issue affects: code that uses FILTER_VALIDATE_FLOAT with min/max limits.",
  "id": "UBUNTU-CVE-2021-21708",
  "modified": "2026-04-22T07:39:54Z",
  "published": "2021-12-31T00:00:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2021-21708"
    },
    {
      "type": "REPORT",
      "url": "https://nakedsecurity.sophos.com/2022/02/18/irony-alert-php-fixes-security-flaw-in-input-validation-code/"
    },
    {
      "type": "REPORT",
      "url": "https://www.php.net/ChangeLog-8.php#PHP_8_1"
    },
    {
      "type": "REPORT",
      "url": "https://www.php.net/ChangeLog-7.php#PHP_7_4"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-5303-1"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2021-21708"
    }
  ],
  "related": [
    "USN-5303-1"
  ],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2021-21708"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…