ubuntu-cve-2026-6104
Vulnerability from osv_ubuntu
Published
2026-05-10 06:16
Modified
2026-06-30 16:18
Summary
Details

In PHP versions 8.4. before 8.4.21 and 8.5. before 8.5.6, when an encoding name containing an embedded NUL byte is passed to mb_convert_encoding() or related mbstring functions, the code incorrectly assumes that when strncasecmp() returns 0 it means the strings have the same length. This can lead to out-of-bounds read of global memory, potentially causing a crash or information disclosure or crash. Affected functions include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), and mb_detect_order(), as well as the mbstring.detect_order and mbstring.http_output INI settings.


{
  "affected": [
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "libapache2-mod-php8.4",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "libphp8.4-embed",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-bcmath",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-bz2",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-cgi",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-cli",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-common",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-curl",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-dba",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-enchant",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-fpm",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-gd",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-gmp",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-interbase",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-intl",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-ldap",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-mbstring",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-mysql",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-odbc",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-opcache",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-pgsql",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-phpdbg",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-readline",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-snmp",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-soap",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-sqlite3",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-sybase",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-tidy",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-xml",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-xsl",
            "binary_version": "8.4.11-1ubuntu1.2"
          },
          {
            "binary_name": "php8.4-zip",
            "binary_version": "8.4.11-1ubuntu1.2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:25.10",
        "name": "php8.4",
        "purl": "pkg:deb/ubuntu/php8.4@8.4.11-1ubuntu1.2?arch=source\u0026distro=questing"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.4.11-1ubuntu1.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.4.5-1ubuntu1",
        "8.4.8-1ubuntu1",
        "8.4.11-1ubuntu1",
        "8.4.11-1ubuntu1.1"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "libapache2-mod-php8.5",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "libphp8.5-embed",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-bcmath",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-bz2",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-cgi",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-cli",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-common",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-curl",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-dba",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-enchant",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-fpm",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-gd",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-gmp",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-interbase",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-intl",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-ldap",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-litespeed",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-mbstring",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-mysql",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-odbc",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-pgsql",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-phpdbg",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-readline",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-snmp",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-soap",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-sqlite3",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-sybase",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-tidy",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-xml",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-xsl",
            "binary_version": "8.5.4-0ubuntu1.1"
          },
          {
            "binary_name": "php8.5-zip",
            "binary_version": "8.5.4-0ubuntu1.1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:26.04:LTS",
        "name": "php8.5",
        "purl": "pkg:deb/ubuntu/php8.5@8.5.4-0ubuntu1.1?arch=source\u0026distro=resolute"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.5.4-0ubuntu1.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.5.2-0ubuntu1",
        "8.5.4-0ubuntu1"
      ]
    }
  ],
  "aliases": [],
  "details": "In PHP versions 8.4.* before 8.4.21 and 8.5.* before 8.5.6, when an encoding name containing an embedded NUL byte is passed to mb_convert_encoding() or related mbstring functions, the code incorrectly assumes that when\u00a0strncasecmp()\u00a0returns 0 it means the strings have the same length. This can lead to out-of-bounds read of global memory, potentially causing a crash or information disclosure or crash.\u00a0Affected functions include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), and mb_detect_order(), as well as the mbstring.detect_order and mbstring.http_output INI settings.",
  "id": "UBUNTU-CVE-2026-6104",
  "modified": "2026-06-30T16:18:37Z",
  "published": "2026-05-10T06:16:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2026-6104"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-6104"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-8336-1"
    }
  ],
  "related": [
    "USN-8336-1"
  ],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L/RE:M/U:Amber",
      "type": "CVSS_V4"
    },
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2026-6104"
  ]
}



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…