-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The handler is one if-statement\n\nThe vulnerable endpoint is `prod/lib/php/devel/iface/login.php`. The AJAX action `nm_action=change_pass` routes to `changePass()` on the page class. Synacktiv's [advisory](https://www.synacktiv.com/en/advisories/scriptcase-pre-authenticated-remote-command-execution), published 2025-07-04, quotes the handler verbatim:\n\n```php\nfunction changePass($str_pass_new='', $str_pass_conf='', $str_lang='', $str_email='', $str_captcha='') {\n if (!$_SESSION['nm_session']['prod_v8']['login']['is_page']) {\n $str_response = \"\";\n } else {\n // [...] resets the password to $str_pass_new\n }\n return json_encode($str_response);\n}\n```\n\nIf `is_page` is true, the handler writes `$str_pass_new` as the new admin password and returns success. If `is_page` is false, the handler returns an empty response and the password does not change. There is no other gate. The handler does not verify:\n\n- The caller's current password\n- A reset token delivered to a verified address\n- That `$str_email` matches any stored admin email\n- That the caller is logged in to anything\n\nThe whole authentication on the password-reset path is one boolean field on the session.\n\n## The flag is set by the page load\n\nSame file. Same class. The constructor:\n\n```php\nfunction __construct() {\n $this->doAjax();\n $this->SetBody('nmPage');\n // [...]\n $this->iniSession();\n $this->SetPageSubtitle('');\n}\n```\n\n`doAjax()` is the AJAX dispatcher. When the request carries `nm_action=change_pass`, `doAjax()` invokes `changePass()`. That is where `is_page` is read.\n\n`iniSession()` is the session bootstrap. It sets `is_page = true`, unconditionally, for every caller that reaches the constructor.\n\nOn a fresh `PHPSESSID`, the first request runs `doAjax()` against an empty session. `is_page` is unset; the change-password handler bails to the empty-string branch; the response is empty. Then `iniSession()` runs and sets `is_page = true`. The session persists across requests.\n\nOn the next request with the same `PHPSESSID`, the constructor runs again. `doAjax()` runs first, still. The session is no longer empty: `is_page = true` from the prior request. The change-password handler passes the check. The admin password resets to the attacker's chosen value.\n\nThe bypass is one GET to `login.php` followed by one POST to `login.php`, with the same cookie. Synacktiv's advisory documents the chain as three requests:\n\n```http\nGET /scriptcase/prod/lib/php/devel/iface/login.php\nCookie: PHPSESSID=synacktiv001\n\nGET /scriptcase/prod/lib/php/devel/lib/php/secureimage.php\nCookie: PHPSESSID=synacktiv001\n\nPOST /scriptcase/prod/lib/php/devel/iface/login.php\nCookie: PHPSESSID=synacktiv001\nContent-Type: application/x-www-form-urlencoded\n\najax=nm&nm_action=change_pass&email=attacker@example.org&pass_new=Synacktiv6&pass_conf=Synacktiv6&captcha=CKMW\n```\n\nGET. GET. POST. The admin password is now `Synacktiv6`.\n\n## `is_page` is anti-CSRF state. The handler treats it as authentication.\n\nThe flag's name and where it is set tell you the intent. `is_page = true` means \"this session has rendered the login page.\" The check is the shape of an anti-CSRF gate: prevent random external POSTs to `login.php?nm_action=change_pass` from triggering the password reset, by requiring the caller to first load the page that hosts the form. A user submitting the legitimate \"forgot my password\" form would have rendered the page first; an external attacker spraying POSTs at the endpoint would not.\n\nThe developer wired this state into the password-reset handler and stopped there. The handler treats \"has loaded the login page\" as the authentication for \"may set the admin password to an attacker-supplied value.\" Nothing else gates the action. The check is real in the sense that an `if` runs and a comparison happens. The flag the check reads is set by the constructor for any GET. The check is asking whether the caller has done the thing every caller can do, by definition, on a public page.\n\nThis is [nonce-is-not-auth](/patterns/nonce-is-not-auth). The canonical form of the pattern is a WordPress plugin treating `wp_verify_nonce()` as authentication for a privileged action; the nonce is harvestable from an unauthenticated peer endpoint, so the gate effectively asks whether the caller has visited the issuing page. ScriptCase's `is_page` is the same shape with the token removed: there is no value to harvest, just a session boolean the constructor sets on first GET. The pattern's boundary statement explicitly extends beyond WordPress to \"a system with a different CSRF token mechanism\" whose authors assume \"token valid\" means \"caller trusted.\" This is that system. The token is a boolean. The bypass is the same one.\n\nThe shape is also why [CVE-2026-3891 in Pix for WooCommerce](/posts/pix-woocommerce-nonce-is-not-auth) is the same bug: nonce check passes, capability check missing. ScriptCase replaces \"nonce check\" with \"session-flag check\" and removes the harvesting step entirely, because there is no token to harvest, only a side effect of the GET.\n\n## The CAPTCHA is the only real gate\n\nThe handler accepts five fields. Two are the new password. One is a locale string. One is an `email` value the handler does not validate against any stored admin email. The last is a four-letter alphabetic CAPTCHA validated against a stock `secureimage.php` instance.\n\nThe Outs1d3r-Net PoC, dated May 2026, eleven months after the Synacktiv advisory, automates the CAPTCHA solve:\n\n```python\nif os.getenv(\"OPENAI_API_KEY\"):\n print(\"[*] Attempting OpenAI vision...\")\n r = requests.post(\n \"https://api.openai.com/v1/chat/completions\",\n headers={\n \"Authorization\": f\"Bearer {os.getenv('OPENAI_API_KEY')}\",\n \"Content-Type\": \"application/json\"\n },\n json={\n \"model\": \"gpt-4o\",\n \"messages\": [{\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"text\", \"text\": \"Read the 4 uppercase letters in this captcha image. Reply ONLY with the 4 letters, nothing else. No spaces.\"},\n {\"type\": \"image_url\", \"image_url\": {\"url\": f\"data:image/png;base64,{b64}\"}}\n ]\n }],\n \"max_tokens\": 10,\n \"temperature\": 0\n },\n timeout=15\n )\n```\n\nThe Synacktiv PoC, dated 2025, hardcoded the CAPTCHA value (`captcha=CKMW` in the published request). The operator typed four letters in. The 2026 PoC sends the image to GPT-4o for a fraction of a cent. The eleven-month evolution of this exploit is not a change to the bug class. The bug class did not change. The cost of solving the only real check on the endpoint did.\n\nThe PoC's email line names what the email field is for:\n\n```python\nemail = f\"poc_{captcha_text.lower()}@pentest.local\"\n```\n\nThe PoC author derives the email value from the CAPTCHA text because the field does nothing. The handler reads it, writes it, and resets the admin password regardless of what it contains. The PoC then verifies the reset worked by logging in via a parallel endpoint, `nm_ini_manager2.php`, with the attacker-chosen password. That endpoint accepts the new admin password directly, because at that point the password store has been updated.\n\n## The NVD record does not name any of this\n\nThe NVD entry for CVE-2025-47227 reads:\n\n> The Administrator password reset mechanism is mishandled. Making both a GET and a POST request to login.php.is sufficient. An unauthenticated attacker can then bypass authentication via administrator account takeover.\n\n\"Making both a GET and a POST request to login.php is sufficient\" is technically accurate and structurally evasive. The text does not name the session flag, the constructor ordering, the fact that `is_page` is set by the page-load handler that runs for any caller, or the absence of every other check on the password-reset path. A defender reading only NVD cannot tell whether this is a missing token validation, a session-fixation bug, or a logic bug in the reset state machine. It is the third. The logic is: you GET'd a public page, so you may now reset the admin password.\n\nThe Synacktiv advisory, published 2025-07-04 by Alexandre Droullé and Alexandre Zanni, names the mechanism. Every code excerpt above comes from it. The vendor fix shipped in 9.12.007 (23). The ScriptCase Production Environment is closed-source obfuscated PHP, so the post-patch diff is not publicly auditable; whether the fix removes the `is_page` check, replaces it with a real authorization gate, or adds a reset-token flow is not visible from outside. What is visible is that the field name `is_page` was reachable at all, in production, in code Synacktiv had to reverse-engineer to publish.\n\nPoC: [Outs1d3r-Net/cve_2025_47227](https://github.com/Outs1d3r-Net/cve_2025_47227)","closing_line":"The check exists, and it fires true after one extra GET to a public page. That is the entire authentication on the endpoint that resets the admin password of every ScriptCase Production Environment up to 9.12.006.","hook_md":"ScriptCase's admin password reset checks one session flag: `$_SESSION['nm_session']['prod_v8']['login']['is_page']`. The handler that sets the flag is the login page's own constructor, which runs for anyone who GETs `login.php`. CVE-2025-47227 is the rule that one extra GET satisfies the only authentication on the endpoint that changes the admin password.","post_id":506,"slug":"scriptcase-cve-2025-47227-page-load-was-the-gate","title":"CVE-2025-47227: ScriptCase's Admin Password Reset Has One Check. The Page Load Sets It True.","type":"initial","unreadable_sentence":"`is_page` is set by anyone who GETs `login.php`. The handler that reads `is_page` resets the admin password."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCaoIGugAKCRDeZjl4jgkQ JmP7APwJHH4tUEm3gtaTvZh9bznvGbuDjgfiUn/tIzuXZXeJCQEAoP801k/oJ521 hoMfiyEOPleDuX9K67CwaftArg3pFA8= =Wk/K -----END PGP SIGNATURE-----