Summary
POST /api/reset-password accepts invalid newPassword classes and reports successful password reset instead of rejecting them.
- Severity: High
- Environment: Local Docker
eshop-sut-backend-1
- HW06 Pool: Pool A / FR-03
- Failed cases:
FR03-DOM-028 through FR03-DOM-036
Preconditions
A disposable registered account has a fresh valid recovery token.
Steps to reproduce
- Obtain a fresh token with
POST /api/forgot-password.
- Send
POST /api/reset-password with the matching email/token and an invalid password, such as a seven-character value.
- Repeat independently for missing uppercase, lowercase, digit, allowed special character; disallowed-only
#; missing, null, and numeric newPassword.
- Use a fresh token for every case.
Expected result
Each request is rejected and the account password remains unchanged. The exact error status/schema is unspecified.
Actual result
All nine requests returned HTTP 200 with {"message":"Password reset successfully"}.
Impact
Weak or malformed credentials can be installed through password recovery, bypassing the password policy inherited from FR-01.
Evidence
23127379_Homework/HW6/Pool-A_FR03_Password_Reset/postman/newman/Pool-A_FR03_report.json
23127379_Homework/HW6/Pool-A_FR03_Password_Reset/postman/newman/Pool-A_FR03_report.html
23127379_Homework/HW6/Pool-A_FR03_Password_Reset/evidence/Pool-A_FR03_newman-cli.txt
- Screenshot generated from the redacted
FR03-DOM-028 failure with MSSV 23127379.
Requirement sources: README FR-03 → FR-01; API specification §1.4
Suggested labels: bug, security, validation, FR-03, api
Summary
POST /api/reset-passwordaccepts invalidnewPasswordclasses and reports successful password reset instead of rejecting them.eshop-sut-backend-1FR03-DOM-028throughFR03-DOM-036Preconditions
A disposable registered account has a fresh valid recovery token.
Steps to reproduce
POST /api/forgot-password.POST /api/reset-passwordwith the matching email/token and an invalid password, such as a seven-character value.#; missing, null, and numericnewPassword.Expected result
Each request is rejected and the account password remains unchanged. The exact error status/schema is unspecified.
Actual result
All nine requests returned HTTP 200 with
{"message":"Password reset successfully"}.Impact
Weak or malformed credentials can be installed through password recovery, bypassing the password policy inherited from FR-01.
Evidence
23127379_Homework/HW6/Pool-A_FR03_Password_Reset/postman/newman/Pool-A_FR03_report.json23127379_Homework/HW6/Pool-A_FR03_Password_Reset/postman/newman/Pool-A_FR03_report.html23127379_Homework/HW6/Pool-A_FR03_Password_Reset/evidence/Pool-A_FR03_newman-cli.txtFR03-DOM-028failure with MSSV23127379.Requirement sources: README FR-03 → FR-01; API specification §1.4
Suggested labels:
bug,security,validation,FR-03,api