Solution
The application checked that the student had signed in, but never checked whether the student was allowed to view the requested document. That let them read other people’s files.
What happened?
The application identified each document by a number in its URL.
A student could view their own document at an address like this:
https://centro.example/documentos/125
Changing the last number let them request a different document:
https://centro.example/documentos/126
The server checked the student’s session without checking ownership or authorisation for the requested document.
If the document existed, the server could return it even if someone else owned it.
This vulnerability is called IDOR (Insecure Direct Object Reference). It occurs when an application uses identifiers to retrieve resources without properly checking the requester’s permissions.
How could it have been prevented?
Check the user’s permission on every document request.
After verifying the session, the server also needs to verify access to that particular resource.
Hard-to-guess identifiers make other files harder to discover, but do not replace authorisation checks.
A project by Eniun