Summary
Idurar IDURAR ERP CRM exposes an invoice download route without authentication middleware, allowing unauthenticated remote users to retrieve invoice PDF files. If invoice identifiers can be enumerated or otherwise obtained, an attacker may download invoices containing customer personally identifiable information.
Affected context
The vulnerability occurs in deployments of Idurar IDURAR ERP CRM where the /download router is publicly reachable and is not protected by authentication or authorization checks. In this context, invoice PDFs may be retrievable based only on a supplied MongoDB ObjectId, allowing access beyond the requesting user's permitted records.
Exploit preconditions
- Attack surface: Publicly reachable remote HTTP
/downloadroute - Required access: No valid account or authenticated session may be required
- Trigger point: A request for an invoice PDF identified by a MongoDB ObjectId
- Why exploitation is possible: The route is mounted without authentication middleware and does not sufficiently verify that the requester is authorized to access the referenced invoice
Why this happens
The underlying flaw is an authorization failure in which a sensitive resource endpoint relies on a client-supplied object identifier without enforcing authentication and object-level access control. This maps to CWE-284: Improper Access Control, because the application does not consistently restrict invoice retrieval to permitted users or roles. Predictable or enumerable identifiers can make the missing authorization boundary easier to abuse.
Potential impact
- Unauthorized disclosure of invoice PDFs
- Exposure of customer names, addresses, transaction details, and other PII
- Bulk harvesting of business and customer records
- Privacy, regulatory, and contractual consequences
- Reputational damage and increased risk of follow-on social engineering
General mitigation guidance
Mitigation typically focuses on enforcing authorization at every sensitive resource boundary and reducing reliance on client-supplied identifiers.
Common defensive patterns include:
- Require authentication before serving invoice files
- Enforce server-side, object-level authorization for each requested invoice
- Derive permitted tenant, customer, or account scope from the authenticated session rather than request parameters
- Use opaque, non-enumerable references where appropriate, without treating them as a substitute for authorization
- Apply rate limiting, monitoring, and response controls to download endpoints
- Prevent direct public access to generated files and use short-lived, authorization-bound delivery mechanisms
- Minimize the sensitive data included in invoice documents and apply least privilege to service identities
How teams detect issues like this
Organizations commonly detect broken access control through:
- Static analysis and route audits that identify sensitive handlers without authentication or authorization middleware
- Code review checks for direct resource lookup using request-supplied identifiers
- Dynamic tests that request another user's invoice while unauthenticated or under a lower-privileged account
- API policy enforcement requiring authentication and object-level authorization for document-download routes
- Monitoring for repeated ObjectId-like requests, sequential resource access, and unusual bulk download activity
- Automated security testing and code review tools that flag public routes serving sensitive files

