{"id":"CVE-2026-33541","aliases":["GHSA-f346-8rp3-4h9h"],"url":"https://o3.security/vulnerability/CVE-2026-33541","summary":"TSPortal's Uncontrolled User Creation via Validation Side Effects Leads to Potential Denial of Service","details":"### Summary\nA flaw in TSPortal allowed attackers to create arbitrary user records in the database by abusing validation logic. While validation correctly rejected invalid usernames, a side effect within a validation rule caused user records to be created regardless of whether the request succeeded. This could be exploited to cause uncontrolled database growth, leading to a potential denial of service (DoS).\n\n### Details\nWhen submitting a Data Processing Agreement (DPA) request in TSPortal, the `DPAAlreadyLive` validation rule previously called `User::findOrCreate()`.\n\nThis method created a user record if one did not already exist.\n\nAlthough username validation (via `MirahezeUsernameRule`) correctly rejected invalid usernames, the `DPAAlreadyLive` rule was still executed during validation. Because it performed a state-changing operation, it created user records even when the overall validation failed and no DPA was created.\n\nAs a result:\n- Validation correctly rejected invalid input\n- However, user records were still inserted into the database as a side effect\n\nThese records were created:\n- Without a successful DPA request\n- Without audit logging tied to a completed action\n- Without visibility into their origin\n\n### Impact\nAn attacker could exploit this behavior by automating requests with invalid usernames, resulting in:\n\n- Mass creation of arbitrary user records\n- Unbounded database growth\n- Increased storage and indexing overhead\n- Potential degradation of application performance\n\nAt scale, this could lead to a denial of service condition due to resource exhaustion.\n\n### Proof of Concept\n1. Submit a DPA request using an invalid username\n2. Ensure the request fails validation due to `MirahezeUsernameRule`\n3. Observe that a corresponding user record is still created in the database\n\nThis behavior was confirmed prior to remediation.\n\n### Root Cause\nThe issue stemmed from:\n- Performing state-changing operations (`findOrCreate`) inside validation logic\n- Validation rules executing regardless of overall validation success\n- Lack of separation between validation and persistence layers\n\n### Mitigation\nThe issue has been fixed by removing database write operations from validation logic.\n\nSpecifically:\n- Replaced `User::findOrCreate()` with a non-mutating lookup (`User::firstWhere(...)`)\n- Ensured validation rules only perform read operations\n- Prevented user creation unless all validation passes","published":"2026-03-26T20:27:05.840Z","modified":"2026-09-18T03:30:15.067356928Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.00293,"percentile":0.21205,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"miraheze/ts-portal","fixedVersion":"34"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33541.json"},{"type":"ADVISORY","url":"https://github.com/miraheze/TSPortal/security/advisories/GHSA-f346-8rp3-4h9h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33541"},{"type":"PACKAGE","url":"https://github.com/miraheze/TSPortal"},{"type":"WEB","url":"https://issue-tracker.miraheze.org/T15115"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-09-18T03:30:15.067356928Z"}}