GHSA-P96F-P2P2-2G3H

Vulnerability from github – Published: 2026-10-30 22:53 – Updated: 2026-10-30 22:53
VLAI
Summary
AdminNeo SQLite: multi_query Incorrect Check of Function Return Value RCE
Details

Summary

This vulnerability is a patch bypass that exploits catastrophic backtracking in a regular expression used to filter ATTACH statements in AdminNeo's SQLite functionality. The original vulnerability (CVE-2021-43008) allowed authenticated users to create PHP files through SQLite ATTACH statements, achieving remote code execution. The patch introduced a regex filter to block ATTACH queries, but this filter is vulnerable to catastrophic backtracking.

Originally reported by @zdi-disclosures in Adminer: https://github.com/vrana/adminer/security/advisories/GHSA-3582-q6xq-5vf7

Analysis

[Source] sql.inc.php :: SQL import handler:47

$query = get_file("sql_file", true, ";");

User uploads a malicious SQL file through the import form. The file content is read into the $query variable without any initial sanitization.

[Transform] sql.inc.php :: SQL import handler:87

// Query parsing loop that extracts individual SQL statements

The uploaded SQL content is processed in a loop that splits it into individual queries. Each query $query is extracted for processing.

[Context] sql.inc.php :: SQL import handler:65

$space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|$line_comment)[^\n]*\n?|--\r?\n)";

Definition of the $space regex pattern used in the ATTACH filter. The possessive quantifier *+ combined with SQLite comment patterns (--) creates the catastrophic backtracking vulnerability when many comment lines are processed.

[Transform] sql.inc.php :: SQL import handler:146

if (DIALECT == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) {

The ATTACH query filter check. When the regex encounters 350,000 SQLite comment lines (--), it triggers catastrophic backtracking. The possessive quantifier *+ causes exponential backtracking, eventually hitting PHP's backtracking limit and causing preg_match() to return false instead of 0 or 1, bypassing the security filter.

[Sink] sql.inc.php :: SQL import handler:162

Connection::get()->multiQuery($q)

When the ATTACH filter is bypassed due to the preg_match() returning false, the malicious SQL query containing the ATTACH statement is executed. This allows the attacker to create a .php file with embedded PHP code, achieving remote code execution when the file is accessed via HTTP.

The root cause is that PHP's preg_match() function returns false when the backtracking limit is exceeded, but the code only checks for truthy values (1 for match), treating false the same as 0 (no match). This allows the ATTACH statement to bypass the security filter.

-- CREDIT --------------------------------------- This vulnerability was discovered by: 0daystolive (Sorcery Ltd) working with TrendAI Zero Day Initiative

Zero Day Initiative zdi-disclosures@trendmicro.com

The PGP key used for all ZDI vendor communications is available from: http://www.zerodayinitiative.com/documents/disclosures-pgp-key.asc

-- INFORMATION ABOUT THE ZDI -------------------- Established by TippingPoint and acquired by Trend Micro, the Zero Day Initiative (ZDI) neither re-sells vulnerability details nor exploit code. Instead, upon notifying the affected product vendor, the ZDI provides its Trend Micro TippingPoint customers with zero day protection through its intrusion prevention technology. Explicit details regarding the specifics of the vulnerability are not exposed to any parties until an official vendor patch is publicly available.

Please contact us for further details or refer to:

http://www.zerodayinitiative.com

-- DISCLOSURE POLICY ---------------------------- Our vulnerability disclosure policy is available online at: http://www.zerodayinitiative.com/advisories/disclosure_policy/

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "adminneo-org/adminneo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.5.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-96634"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-74"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-30T22:53:08Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nThis vulnerability is a patch bypass that exploits catastrophic backtracking in a regular expression used to filter ATTACH statements in AdminNeo\u0027s SQLite functionality. The original vulnerability (CVE-2021-43008) allowed authenticated users to create PHP files through SQLite ATTACH statements, achieving remote code execution. The patch introduced a regex filter to block ATTACH queries, but this filter is vulnerable to catastrophic backtracking.\n\nOriginally reported by @zdi-disclosures in Adminer: https://github.com/vrana/adminer/security/advisories/GHSA-3582-q6xq-5vf7\n\n### Analysis\n\n**[Source]** sql.inc.php :: SQL import handler:47\n\n```php\n$query = get_file(\"sql_file\", true, \";\");\n```\n\n\u003e User uploads a malicious SQL file through the import form. The file content is read into the `$query` variable without any initial sanitization.\n\n**[Transform]** sql.inc.php :: SQL import handler:87\n\n```php\n// Query parsing loop that extracts individual SQL statements\n```\n\n\u003e The uploaded SQL content is processed in a loop that splits it into individual queries. Each query `$query` is extracted for processing.\n\n**[Context]** sql.inc.php :: SQL import handler:65\n\n```php\n$space = \"(?:\\\\s|/\\\\*[\\s\\S]*?\\\\*/|(?:#|$line_comment)[^\\n]*\\n?|--\\r?\\n)\";\n```\n\n\u003e Definition of the `$space` regex pattern used in the ATTACH filter. The possessive quantifier `*+` combined with SQLite comment patterns (`--`) creates the catastrophic backtracking vulnerability when many comment lines are processed.\n\n**[Transform]** sql.inc.php :: SQL import handler:146\n\n```php\nif (DIALECT == \"sqlite\" \u0026\u0026 preg_match(\"~^$space*+ATTACH\\\\b~i\", $q, $match)) {\n```\n\n\u003e The ATTACH query filter check. When the regex encounters 350,000 SQLite comment lines (`--`), it triggers catastrophic backtracking. The possessive quantifier `*+` causes exponential backtracking, eventually hitting PHP\u0027s backtracking limit and causing `preg_match()` to return `false` instead of `0` or `1`, bypassing the security filter.\n\n**[Sink]** sql.inc.php :: SQL import handler:162\n\n```php\nConnection::get()-\u003emultiQuery($q)\n```\n\n\u003e When the ATTACH filter is bypassed due to the `preg_match()` returning `false`, the malicious SQL query containing the ATTACH statement is executed. This allows the attacker to create a `.php` file with embedded PHP code, achieving remote code execution when the file is accessed via HTTP.\n\nThe root cause is that PHP\u0027s `preg_match()` function returns `false` when the backtracking limit is exceeded, but the code only checks for truthy values (1 for match), treating `false` the same as `0` (no match). This allows the ATTACH statement to bypass the security filter.\n\n-- CREDIT ---------------------------------------\nThis vulnerability was discovered by:\n0daystolive (Sorcery Ltd) working with TrendAI Zero Day Initiative\n\nZero Day Initiative\nzdi-disclosures@trendmicro.com\n\nThe PGP key used for all ZDI vendor communications is available from:\nhttp://www.zerodayinitiative.com/documents/disclosures-pgp-key.asc\n\n-- INFORMATION ABOUT THE ZDI --------------------\nEstablished by TippingPoint and acquired by Trend Micro, the Zero Day Initiative (ZDI) neither re-sells vulnerability details nor exploit code. Instead, upon notifying the affected product vendor, the ZDI provides its Trend Micro TippingPoint customers with zero day protection through its intrusion prevention technology. Explicit details regarding the specifics of the vulnerability are not exposed to any parties until an official vendor patch is publicly available.\n\nPlease contact us for further details or refer to:\n\nhttp://www.zerodayinitiative.com\n\n-- DISCLOSURE POLICY ----------------------------\nOur vulnerability disclosure policy is available online at:\nhttp://www.zerodayinitiative.com/advisories/disclosure_policy/",
  "id": "GHSA-p96f-p2p2-2g3h",
  "modified": "2026-10-30T22:53:08Z",
  "published": "2026-10-30T22:53:08Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/adminneo-org/adminneo/security/advisories/GHSA-p96f-p2p2-2g3h"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adminneo-org/adminneo/commit/7e5658ffb0d890cd1a6152a09e3172da85ca4b77"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/adminneo-org/adminneo"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adminneo-org/adminneo/releases/tag/v5.5.1"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "AdminNeo SQLite: multi_query Incorrect Check of Function Return Value RCE"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.