Summary
RuoYi's user registration endpoint has an input validation vulnerability involving the deptId, status, userId, and createBy arguments. A remote attacker may be able to submit improperly validated values, potentially affecting user or account data depending on how the values are processed.
Affected context
The issue is reported in the user registration endpoint in ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java in RuoYi versions up to 4.8.3. It may be present when values supplied for the affected arguments are accepted without adequate validation or authorization checks.
Exploit preconditions
- Attack surface: The remotely accessible user registration endpoint
- Required access: The report does not specify whether authentication is required; access to the endpoint is the relevant prerequisite
- Trigger point: Processing registration requests containing
deptId,status,userId, orcreateBy - Why exploitation is possible: Improper validation may allow unexpected argument values to reach application logic
Why this happens
The reported weakness is improper input validation, classified as CWE-20. The underlying bug class occurs when externally supplied values are not adequately checked for acceptable type, format, range, or permitted use before application logic processes them. The available description does not specify the exact validation failure or downstream behavior.
Potential impact
- User records could contain unexpected or inconsistent values
- Account or organizational data integrity could be affected
- If downstream logic trusts these values, access control or account-management behavior could be influenced
General mitigation guidance
Defensive patterns include validating each input against an explicit schema and business rules, and rejecting unexpected values before processing. Derive sensitive identity and audit fields from trusted server-side context rather than client-supplied values where practical. Apply authorization checks to any operation that assigns status or organizational attributes, and run the endpoint with only the privileges it requires.
How teams detect issues like this
- Review registration handlers for validation of all externally supplied fields, including type, range, and allowed values
- Use static analysis or code review checks to identify request parameters used in persistence or authorization decisions without validation
- Enforce API schemas and centralized validation policies at the application boundary
- Monitor registration requests and resulting records for unexpected values or changes to sensitive fields

