View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037130 | mantisbt | authentication | public | 2026-05-14 08:09 | 2026-05-14 10:34 |
| Reporter | dombn | Assigned To | community | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.28.2 | ||||
| Target Version | 2.28.3 | Fixed in Version | 2.28.3 | ||
| Summary | 0037130: login_password_page.php: CSRF validation fails when called via auth_reauthenticate() (since 2.28.2) | ||||
| Description | Since 2.28.2, Root cause:
In the normal two-step login flow ( Affected versions: 2.28.2, master (2.29.0-dev). Versions 2.28.0 and 2.28.1 are not affected. | ||||
| Steps To Reproduce |
| ||||
| Additional Information | Expected behavior: The password form is displayed and the user can re-authenticate normally. Suggested fix: Move | ||||
| Tags | No tags attached. | ||||
|
Reproduced on the official MantisBT instance (2.29.0-dev-master-6fce5960e) by navigating to account_page.php while logged in. auth_reauthenticate() redirected to login_password_page.php?reauthenticate=1 via GET, triggering the CSRF validation failure immediately — before the password form was ever |
|
|
The regression was introduced by commit |
|
|
Fix submitted as GitHub Pull Request: https://github.com/mantisbt/mantisbt/pull/2220 |
|
|
@dombn many thanks for catching this regression and providing a PR. Sorry I failed to test this code path before releasing 2.28.2. I'll review and test the patch, and will work on releasing 2.28.3 as soon as possible. |
|
|
I know why I didn't catch this in my local tests - I had set |
|
|
MantisBT: master-2.28 75b10b39 2026-04-11 18:49 Details Diff |
Add CSRF protection to login process Improves security, reducing risk of a vulnerability escalating its impact. As recommended by @siunam in Issue 0037011. |
Affected Issues 0037011, 0037130 |
|
| mod - login.php | Diff File | ||
| mod - login_page.php | Diff File | ||
| mod - login_password_page.php | Diff File | ||
|
MantisBT: master-2.28 b6faebd5 2026-05-14 08:20 Committer: dregad Details Diff |
Fix CSRF validation failure in reauthenticate flow auth_reauthenticate() redirects to login_password_page.php via GET, bypassing login_page.php which normally generates the CSRF token. The form_security_validate() call therefore always fails with ERROR #2800, making re-authentication impossible. Fix: read $f_reauthenticate before the CSRF check and skip validation for that path. The token rendered in the form still protects the subsequent password submission via login.php. Fixes 0037130, PR https://github.com/mantisbt/mantisbt/pull/2220 |
Affected Issues 0037130 |
|
| mod - login_password_page.php | Diff File | ||