████ ' can add animal to other account ' at ██████
The application allowed a user to add a pet to another user's account by changing the user identifier in the request. An attacker could therefore modify another account's pet list without authorisation.
- Disclosed after 55 days
Summary by the program
A security vulnerability was identified where an attacker can add a pet to another user's account without authorization. The vulnerability exists due to a lack of proper access controls, allowing the attacker to modify the idUsuario parameter in the request to associate the pet with a different account. This vulnerability falls under the CWE-639 category, "Authorization Bypass Through User-Controlled Key," which describes a system's failure to prevent one user from accessing another user's data by modifying the key value.
What the report shows
The target is a Mars program asset, *.miroyalcanin.cl, and the feature involved is pet registration: adding an animal to a user account. The researcher is credited as 0xs4m, the weakness is classified as Insecure Direct Object Reference (IDOR), and the report was disclosed on 22 June 2023 with a medium severity. No CVSS score or bounty amount is given.
The summary is written by the program rather than the researcher, and it is brief. It states that an attacker could add a pet to another user's account without authorisation. The mechanism it names is a lack of proper access controls on a request parameter called idUsuario, which the attacker can modify so that the pet is associated with a different account. The program maps this to CWE-639, "Authorization Bypass Through User-Controlled Key", which it describes as a system's failure to prevent one user from accessing another user's data by changing the key value.
In steps:
- The attacker uses the pet creation feature, which builds a request carrying an
idUsuariovalue identifying the account the pet belongs to. - Instead of leaving that value as their own account identifier, the attacker changes it to another user's identifier.
- The server accepts the modified value and creates the pet under the victim's account, because proper access controls are missing.
The report does not include the raw HTTP request, the parameter's location (body, query string or path), the identifier format, or any response captured from the server. It also does not describe a fix or a retest. What it does establish is the outcome: an authorisation bypass rated medium and disclosed publicly.
Root cause
The report points to a missing authorisation check on a user-controlled key. The application takes the account identifier for the new pet from the client and trusts it. The handler does not verify that the requester is permitted to act on the idUsuario supplied in the request. The object reference is therefore direct and unguarded: the attacker can write into another account by changing the identifier.
This is a write-side variant of the classic IDOR. Many implementations check ownership when reading a record and forget to apply the same check when creating or updating one, because the create path is assumed to act only on the caller's own data.
Impact
The report's own framing is narrow: an attacker can add a pet to another user's account without authorisation. That is unauthorised modification of another user's data. The report describes only unauthorised modification of another user's data. The report does not claim data disclosure, account takeover or access to the victim's session, and those should not be assumed from it. The report rates the issue medium severity.
How this kind of bug works
An IDOR arises when an application exposes a reference to an internal object (a numeric ID, a UUID, a slug, an account number) and uses it to select the object to act on, without checking that the caller is allowed to act on that particular object. Authentication answers "who are you"; authorisation answers "may you do this to this object". IDOR is the second question going unasked.
CWE-639, the category the program cites, is specifically about keys the user controls. The server accepts the key from the request and uses it as the basis for a lookup or a write, so the attacker chooses which object is affected. Sequential integer identifiers make discovery trivial; UUIDs make guessing harder but do not fix the flaw, because identifiers leak through other responses, emails, shared links and exports.
The reliable defence is server-side authorisation on every object access: derive the acting user from the session, load the target object, and confirm the relationship between the two before performing the operation. Where the client must send an identifier, validate it against the session rather than trusting it. Deny by default, and apply the same check to read, create, update and delete paths alike.
How to test for it
- Map the features that create or modify objects tied to an account: registration forms, profile updates, saved items, addresses, sub-resources such as the pets here.
- Capture the requests in an intercepting proxy and identify every parameter that looks like an object or owner reference: numeric IDs, UUIDs, account numbers, e-mail addresses, nested keys.
- Create two accounts you control, A and B, and record the identifiers each one uses.
- Replay A's request with B's identifier substituted, keeping A's session cookie. Try the identifier in the body, the query string and the path, and try both directions.
- A positive result is a server response indicating success (a created object, a 200 or 201, a redirect to a confirmation page) combined with the object appearing in B's account when you log in as B. Verify in the victim's own view, not just from the response body.
- Repeat for update and delete operations on the same object, and for read endpoints, since the same missing check often affects several verbs.
Common false positives: the server returns a generic success page but silently ignores the foreign identifier and writes to the caller's own account; the identifier is validated but the error is rendered with a 200 status; the object is created but not actually linked to the victim; or the endpoint is intentionally shared, such as a public wishlist. Always confirm the effect from the second account.
How it is fixed
- Enforce object-level authorisation on the server for every operation, deriving the owner from the authenticated session instead of the request.
- Where a client-supplied identifier is unavoidable, validate that the caller has the right to act on that object before any write.
- Prefer indirect references, such as mapping a per-session token to the real identifier, so raw internal keys are never exposed.
- Apply the check consistently across create, read, update and delete handlers, and add regression tests that attempt cross-account writes.
- Log and alert on authorisation failures so attempts are visible.
Hunting notes
This class hides wherever an account owns sub-resources: pets, addresses, payment methods, documents, team members, API keys, draft content. Create and update endpoints are the most commonly missed, because developers focus on protecting reads. Look for parameters named after the owner (idUsuario, userId, accountId, owner) and for nested routes where the parent identifier is in the path.
Recon signals: registration flows that return an internal identifier in the response; APIs that accept both a session and an explicit owner field; mobile or single-page clients that send the full object back on save. Comparing the request a client sends for "my profile" against the one it sends when creating a child object often reveals the owner key.
To make a report land, demonstrate the effect from the victim's side: show the object appearing in the second account, include the exact request and response, and state the impact in terms of integrity of another user's data. Keep the proof minimal and reproducible, and avoid touching real users' accounts.
What happened, in plain words
This report is about a website for a pet food brand, at an address ending in *.miroyalcanin.cl. The site has a feature for registering a pet: you fill something in and the animal is added to your user account. The researcher who found the problem is credited as 0xs4m. The report was made public on 22 June 2023, the severity was rated medium, and the weakness is classified as Insecure Direct Object Reference (IDOR). No CVSS score and no bounty amount are given.
The summary in the report was written by the program that runs the bug bounty, not by the researcher, and it is short. It says an attacker could add a pet to another user's account without authorisation. The cause it names is a lack of proper access controls on a request parameter called idUsuario, which the attacker can change so that the pet ends up attached to a different account. The program files this under CWE-639, "Authorization Bypass Through User-Controlled Key", which it describes as a system failing to stop one user from reaching another user's data by changing a key value.
A few words before the steps. A request is the message your browser sends to a server when you do something on a site, for example when you press a button on a form. It carries the details of what you asked for. A parameter is one named piece of information inside that request, like a field on a paper form: a name and a value. idUsuario is such a parameter, and its value identifies the account the pet belongs to. "Usuario" is Spanish for user, so the name means "user id".
In steps, as the report describes it:
- The attacker uses the pet creation feature. That feature builds a request carrying an
idUsuariovalue, which says which account the pet belongs to. - Instead of leaving that value as their own account identifier, the attacker changes it to another user's identifier.
- The server accepts the changed value and creates the pet under the victim's account, because proper access controls are missing.
Why does step 3 matter so much? Because the server is the only party that can enforce the rules. The browser belongs to the user and can be made to send anything. If the server simply believes the account number it is handed, then anyone who can edit a request can choose whose account gets the new pet. The everyday comparison is a hotel reception that hands out room keys to anyone who states a room number, without checking the name on the booking.
The report does not include the raw HTTP request, does not say where the parameter sits (in the body of the request, in the address, or elsewhere), does not give the format of the identifier, and does not show any response from the server. It also does not describe a fix or a retest. What it does establish is the outcome: an authorisation bypass, rated medium and disclosed publicly.
Why it is a security problem
The report's own framing is narrow: an attacker can add a pet to another user's account without authorisation. That is unauthorised modification of someone else's data. The report describes only unauthorised modification of someone else's data. The report does not claim that data was disclosed, that an account was taken over, or that the victim's session was accessed, and none of that should be assumed from it. The report rates the issue medium severity.
In general, how this kind of bug works
An IDOR (Insecure Direct Object Reference) happens when an application hands out a reference to an internal object, such as a number, a long random-looking string called a UUID, a name used in a web address, or an account number, and uses that reference to pick which object to act on, without checking that the caller is allowed to act on that particular object. The comparison is a cloakroom: if the attendant gives back whichever coat matches the ticket number you say out loud, without checking that the ticket is yours, then anyone can claim any coat.
Two ideas are often confused. Authentication answers "who are you": it is the login, the session, the proof that you are a particular user. Authorisation answers "may you do this to this object": it is the permission check. IDOR is the second question never being asked. The server knows who you are and stops there.
CWE-639, the category the program cites, is specifically about keys the user controls. The server takes the key from the request and uses it to look something up or to write something, so the attacker chooses which object is affected. Simple counting numbers make discovery easy, because you can try 1, 2, 3. Long random identifiers make guessing harder but do not fix the flaw, because identifiers leak through other responses, emails, shared links and exports.
The reliable defence is a server-side authorisation check on every object access: work out the acting user from the session, load the target object, and confirm the relationship between the two before doing the operation. Where the client must send an identifier, check it against the session rather than trusting it. Deny by default, and apply the same check to reading, creating, updating and deleting.
How to test for it
- List the features that create or change objects tied to an account: registration forms, profile updates, saved items, addresses, and sub-resources such as the pets here.
- Capture the requests in an intercepting proxy, a tool that sits between your browser and the server and lets you read and edit traffic. Identify every parameter that looks like an object or owner reference: numbers, UUIDs, account numbers, e-mail addresses, nested keys.
- Create two accounts you control, A and B, and note the identifiers each one uses.
- Replay A's request with B's identifier substituted, keeping A's session cookie. A cookie is a small piece of data the site stores in your browser so it can recognise your logged-in session on later requests. Try the identifier in the body, in the address and in the path, and try both directions.
- A positive result is a server response that indicates success (a created object, a 200 or 201 status, a redirect to a confirmation page) combined with the object appearing in B's account when you log in as B. Confirm it in the victim's own view, not just from the response body.
- Repeat for update and delete operations on the same object, and for read endpoints, since the same missing check often affects several operations.
Common false positives: the server returns a generic success page but quietly ignores the foreign identifier and writes to your own account; the identifier is checked but the error is shown with a 200 status; the object is created but not actually linked to the victim; or the endpoint is intentionally shared, such as a public wishlist. Always confirm the effect from the second account.
How it is fixed
- Enforce object-level authorisation on the server for every operation, taking the owner from the authenticated session instead of from the request.
- Where a client-supplied identifier cannot be avoided, check that the caller has the right to act on that object before any write.
- Prefer indirect references, such as mapping a per-session token to the real identifier, so raw internal keys are never exposed.
- Apply the check consistently across create, read, update and delete handlers, and add regression tests that attempt cross-account writes.
- Log and alert on authorisation failures so attempts are visible.
Where to look
This class hides wherever an account owns sub-resources: pets, addresses, payment methods, documents, team members, API keys, draft content. Create and update endpoints are the most commonly missed, because developers focus on protecting reads. Look for parameters named after the owner (idUsuario, userId, accountId, owner) and for nested routes where the parent identifier is in the path.
Signals during recon: registration flows that return an internal identifier in the response; APIs that accept both a session and an explicit owner field; mobile or single-page clients that send the whole object back on save. Comparing the request a client sends for "my profile" against the one it sends when creating a child object often reveals the owner key.
To make a report land, show the effect from the victim's side: show the object appearing in the second account, include the exact request and response, and state the impact in terms of the integrity of another user's data. Keep the proof minimal and reproducible, and avoid touching real users' accounts.
Glossary
- Request: the message a browser sends to a server describing an action, such as submitting a form.
- Parameter: a named piece of data inside a request, with a name and a value, like a field on a form.
idUsuario: the parameter in this report whose value identifies the account a pet belongs to; "usuario" is Spanish for user.- Server: the computer that runs the website and decides what happens to each request.
- Session: the server's record that a particular browser is logged in as a particular user.
- Cookie: a small piece of data stored in the browser that lets the site recognise your session on later requests.
- Authentication: proving who you are, for example by logging in.
- Authorisation: deciding whether an identified user is allowed to perform a particular action on a particular object.
- IDOR (Insecure Direct Object Reference): a flaw where an application uses a user-supplied reference to pick an object without checking that the user may act on it.
- CWE-639: the weakness category "Authorization Bypass Through User-Controlled Key", cited by the program for this report.
- UUID: a long, random-looking identifier used instead of a simple counting number.
- Intercepting proxy: a tool placed between browser and server that lets you read and edit requests and responses.
- HTTP status code: a number in the server's reply indicating the outcome, such as 200 for success or 201 for created.
- False positive: a test result that looks like a vulnerability but is not one.
- Integrity: the property that data has not been changed by someone who is not allowed to change it.
- CVSS: a standard scoring system for the severity of a vulnerability; no score is given in this report.