| 1 | | del |
| | 1 | Test Report & Security Impact Analysis |
| | 2 | 1. Environment |
| | 3 | WordPress: 7.1-alpha (trunk) |
| | 4 | |
| | 5 | Setup: Multisite Network Admin |
| | 6 | |
| | 7 | Verification Method: Standalone PHP Mock + Browser DevTools Interception |
| | 8 | |
| | 9 | 2. Security Analysis: Why a PoC is currently "Silent" |
| | 10 | I would like to clarify the current impact of this vulnerability. While the fix is essential, a successful XSS alert is currently unlikely to trigger in the default UI for the following reasons: |
| | 11 | |
| | 12 | Empty Response on Malicious Payload: When a payload like <script>alert('XSS')</script> is injected into the term parameter, the backend executes a get_users query. Since no user account exists with such a string, the database returns an empty set. The resulting Ajax response is an empty array []. |
| | 13 | |
| | 14 | Safe Client-Side Handling: The current core JavaScript expects a JSON array of user objects. When it receives [], it simply does not render any dropdown items, preventing the payload from being echoed back into the DOM. |
| | 15 | |
| | 16 | 3. Why the fix is still critical |
| | 17 | Log Poisoning / Second-Order XSS: If the search term is recorded in server-side logs (e.g., Audit logs or Slow Query logs) viewed in other admin interfaces, the script could execute. |
| | 18 | |
| | 19 | Future-Proofing: Any UI changes displaying "No results found for: [term]" would immediately turn this into a high-risk Reflected XSS. |
| | 20 | |
| | 21 | Data Integrity: Aligning with WP coding standards by sanitizing at the entry point. |
| | 22 | |
| | 23 | 4. Verification Results |
| | 24 | [Next comment]My standalone tests confirm that the patch correctly strips HTML tags at the entry point. |
| | 25 | |
| | 26 | Payload Intercepted via DevTools: |
| | 27 | |
| | 28 | |
| | 29 | action: autocomplete-user |
| | 30 | term: <script>alert('XSS')</script>Admin |
| | 31 | site_id: 2 |
| | 32 | Backend Observation (using attached test script): |
| | 33 | |
| | 34 | Before Patch: get_users receives the raw <script> tag. |
| | 35 | |
| | 36 | After Patch: get_users receives the sanitized string alert('XSS')Admin. |
| | 37 | |
| | 38 | [[Image(test-65051-sanitize.png)]] |