Summary
yshop-crm does not adequately enforce authorization on the saveRedisSet and getRedisSet endpoints in CrmCustomerController. Any authenticated back-office user may therefore read or modify shared Redis settings that control lead allocation and customer auto-recycling behavior, potentially disrupting customer management across the deployment.
Affected context
The vulnerability occurs in yshop-crm deployments through version 2.1.3 where the CRM back-office exposes Redis configuration endpoints without sufficiently restricting access by role or privilege. It becomes risky when a user with ordinary authenticated back-office access can reach these endpoints and the associated Redis keys control installation-wide customer allocation, recycling, or creation workflows.
Exploit preconditions
- Attack surface:
saveRedisSetandgetRedisSetendpoints inCrmCustomerController - Required access: Any authenticated back-office account, subject to the deployment's authentication controls
- Trigger point: Reading or submitting requests to the Redis-setting endpoints
- Why exploitation is possible: Authorization checks do not adequately distinguish privileged administrators from other authenticated back-office users, allowing access to shared policy values
Why this happens
The underlying issue is missing authorization enforcement, mapped to CWE-862: Missing Authorization. The application authenticates users but does not consistently verify that the requesting account is permitted to read or change installation-wide Redis-backed policy settings. This insecure pattern allows a lower-privileged authenticated principal to operate on resources reserved for administrative control.
Potential impact
- Customer records may be deleted or made subject to unintended mass auto-recycling
- Lead recycling may be disabled across the deployment
- Customer creation workflows could be blocked
- Shared CRM behavior may be altered without appropriate administrative approval
- Business operations and customer data integrity may be disrupted
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the endpoint and resource level rather than relying only on authentication.
Common defensive patterns include:
- Apply explicit role- and privilege-based checks to both read and write operations
- Treat installation-wide Redis keys as administrative resources with restricted ownership
- Separate access to policy inspection from access to policy modification
- Validate requested setting names and values against an allowlisted schema
- Reduce input trust by deriving policy scope from the authenticated server-side context
- Use least-privilege service accounts and Redis permissions
- Add audit logging, change review, and rollback controls for high-impact policy updates
- Fail closed when authorization context or policy validation is unavailable
How teams detect issues like this
Detection approaches can include:
- Static analysis for controller methods that access shared configuration or Redis without centralized authorization checks
- Code review searches for endpoint handlers that authenticate users but omit role, ownership, or permission validation
- Route and API inventory reviews comparing sensitive operations with required administrative privileges
- Runtime monitoring for policy changes by non-administrative accounts
- Alerts for unusual reads or writes to customer-allocation and auto-recycling keys
- Automated security tests that exercise sensitive endpoints with accounts of varying privilege levels
- Policy enforcement requiring authorization middleware for configuration-management routes

