IDOR vulnerability on invoice and weak password reset leads to account take over
An order-history endpoint fetched records by a sequential number without checking ownership, so changing the number returned other customers' order details, including payment receipts and billing addresses. Separately, the password reset flow leaked a token in the response and accepted a different token than the one emailed, which the author says could be chained with the IDOR to take over accounts.
This year I started doing bug bounties and I only got valid p5 report and my report for p4 and p3 got rejected.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a write-up of a short engagement against an e-commerce site, carried out over five to six hours on 23 January. The owner of the site asked the researcher to test it, and later agreed to disclosure. The researcher describes themselves as new to bug bounties, with only a valid P5 report to their name before this and rejected P4 and P3 submissions.
The site is an online shop with the usual customer-facing features: registration and login, a purchase history where bought items are listed and can be viewed, a password reset flow, a file upload, and an admin panel. Five issues were found in total:
found bugs
IDOR
Weak password reset
Business logic flaw
publicly accessible configuration files
some p5
Only the first four are described in any depth. The P5 items are mentioned in passing: a weak password policy at registration, missing rate limiting on login, and a file upload whose filter the researcher tried and failed to bypass (EXIF data was also being stripped).
Setup
No accounts other than the researcher's own were used, and the researcher explicitly did not test the admin panel because they did not own that account. Enumeration was done with subfinder, gau, nuclei, httpx and paramspider. After enumeration turned up configuration files and some non-existent directories, ffuf was used to explore the site further. Interception and request manipulation were done with Burp Suite. No versions are given for any of the tools.
Finding it
IDOR in the purchase history
After buying an item, it appears in the purchase history and can be viewed. Watching the network tab, the page fetches an item followed by a number, which looked likely to be prone to IDOR. The request was intercepted in Burp and the value changed; the change succeeded.

The response leaks a lot of information about the customer, including their payment receipt, billing addresses and similar data, in other words personally identifiable information (PII). The researcher notes that the Bugcrowd taxonomy would treat this as P1, while admitting uncertainty because they were new to bug bounty.


my data response
The response also contains the image link for the customer's payment receipt.

Data that i should get

data from IDOR
Weak password reset
Looking for more common bugs, the researcher tried the reset password functionality. Intercepted in Burp, it leaks some token, which the researcher rates as P4 under the Bugcrowd taxonomy.


The email that arrives points at a URL of the form:
https://redacted.com/reset-password/<token>/<email address>
but the token in the email was different from the one seen in Burp, so the researcher assumed the Burp token would not work.

It did. Entering the token intercepted from Burp still redirected to the password change page. The email token starts with 6e2 and ends a50, while the token from Burp was XKJ to Y9H.

This made the researcher realise that the IDOR and the weak password reset could be chained for a much larger security impact.
The admin panel shows the token from Burp, and a little recon could yield a possible admin email. The researcher did not test the admin panel, since they did not own that account and should not test accounts they do not own.
The login functionality also has no rate limiting and is prone to brute force, but the researcher rates this as likely P5, noting that if an IP block exists it could be bypassed with IP rotation from a Burp extension or a custom script.
Business logic flaw in checkout
The next bug is a business logic flaw when purchasing an item, allowing an item to be bought for free or at an unexpected price.
The researcher tried buying the highest priced item, which costs around 65,990, with a total cost of 66,240. The interface does not allow subtracting the quantity, but adding more quantity is allowed.

Intercepting the request in Burp, only the quantity could be manipulated.

Setting the quantity to 0 changed the total amount to 251, making an item that costs around 65,990 purchasable for a total price of 251. Reloading the website, the total amount stayed at 251.

After completing the transaction the purchase went through, and the researcher reported it because they did not want the item shipped.

Later an email arrived saying the order had been cancelled, and it carried an invoice with the same total amount of 251.
Publicly accessible configuration files
The last bug was the web.config and .htaccess files found while enumerating. The .htaccess was new to the researcher, who noted possible RCE, DOS and similar outcomes. A few payloads were tried but did not work, and the researcher concludes that more research is needed to understand how .htaccess works. The exploitation references given are:
https://github.com/wireghoul/htshells
https://www.acunetix.com/vulnerabilities/web/htaccess-file-readable/
https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/htaccess-file-detected/
https://book.hacktricks.xyz/pentesting/pentesting-web/php-tricks-esp#code-execution-via-.httaccess

.htaccess

web.config
Root cause
The report does not show the server-side code, so the following is inferred from behaviour.
The IDOR is the classic case of an object identifier taken from the request and used to look up a record without checking that the record belongs to the authenticated user. The purchase history endpoint fetches an item by a numeric identifier, and changing that number returns another customer's order, including billing address and a link to the payment receipt image. Authorisation is likely applied to the session but not to the object.
The password reset flaw is that a token observed in Burp, different from the one in the emailed link, was accepted and redirected to the password change page. The reset URL carries both a token and an email address, and the two are evidently not validated as a pair.
The checkout flaw is a missing server-side validation of the quantity. The interface did not allow subtracting the quantity, but the server accepted a quantity of 0 and recalculated the total from it. The recalculated total persists across a reload, which suggests it is stored server-side rather than computed in the browser.
The exposed .htaccess and web.config are a deployment problem: configuration files that should not be publicly accessible were found while enumerating.
Impact
Through the IDOR, an authenticated customer can read other customers' order records: billing addresses, payment receipts and other PII. The report does not quantify how many records are reachable or whether the identifier space is enumerable beyond the observation that it is a number.
Through the weak reset, a token observed in Burp, different from the emailed one, was accepted and reached the password change page. The researcher considers the IDOR and the weak password reset could be chained for a much larger security impact. The admin panel shows the same behaviour, and recon could produce a possible admin email, but this was not tested.
Through the checkout flaw, an item priced around 65,990 could be bought for a total of 251. In this case an item priced around 65,990 was bought for 251, and the order was later cancelled with an invoice for the same 251.
The exposed configuration files could, in the researcher's view, lead to RCE or DOS, but the payloads tried did not work and no exploitation is demonstrated.
Fix
The report does not say what the owner changed. The fixes implied by the findings are:
- Enforce object-level authorisation on the purchase history endpoint: derive the customer from the session and reject any identifier that does not belong to them.
- Bind reset tokens to the account and to the reset request, validate the token and email address as a pair, and expire tokens after use.
- Validate quantity and price server-side, rejecting zero or negative quantities and recomputing totals from trusted data.
- Deny access to .htaccess, web.config and similar files at the web server level.
- Add rate limiting to login and a stronger password policy, as noted in the P5 findings.
Variants to test
- Numeric object identifiers elsewhere. Look for any endpoint that fetches a record by an incrementing number (orders, invoices, addresses, receipts). A positive result is a response containing another user's data when the number is changed.
- Reset token reuse across requests. Request two resets for the same account and try the token from one against the link of the other. A positive result is reaching the password change page with a mismatched token.
- Reset token not bound to the email. Change the email address in the reset URL while keeping the token. A positive result is a valid reset page for a different account.
- Quantity and price tampering at checkout. Intercept the cart or order request and set quantity to 0, a negative number, or a fraction, and try changing the price field directly. A positive result is a stored total lower than the item price that survives a reload.
- Configuration file exposure. Request
/.htaccess,/web.configand similar paths directly. A positive result is the file contents returned with a 200 status. - Login brute force without lockout. Send repeated authentication attempts and watch for rate limiting or IP blocking. A positive result is continued processing of attempts without throttling.
What happened, in plain words
A person who was new to bug bounties was asked by someone they knew to test a website the person owned. The site was an online shop (an e-commerce site). Over five to six hours on 23 January, the tester found five problems. The owner agreed that the findings could be written up publicly.
Before this, the tester had only ever had one low-severity report accepted (a P5), and two higher-severity reports (P4 and P3) rejected. So this was an early piece of work, and the write-up is honest about that: in several places the tester says they were unsure how severe something was.
The five problems were:
found bugs
IDOR
Weak password reset
Business logic flaw
publicly accessible configuration files
some p5
The first four are described in detail. The P5 items are only mentioned in passing: a weak password policy at registration, no rate limiting on login, and a file upload whose filter the tester tried and failed to bypass (the site was also stripping EXIF data from uploaded images).
A quick word on the jargon before we start, because the rest of the article uses it constantly:
- An e-commerce site is an online shop. You register, log in, put things in a basket, pay, and later look at your order history.
- A vulnerability is a mistake in how the site is built that lets someone do something the owner did not intend.
- Severity ratings like P1 to P5 are a rough scale used by bug bounty platforms. P1 is the most serious, P5 the least. Different platforms use slightly different scales, and the tester refers to the Bugcrowd taxonomy, which is Bugcrowd's published guide to how it rates findings.
- Bug bounty is the practice of testing a site with permission and reporting what you find, sometimes for a reward.
Setting up
The tester only ever used their own account. They explicitly did not test the admin panel, because they did not own that account, and testing accounts you do not own is not acceptable. That is an important habit: permission covers the site, but not other people's accounts.
To find things to look at, the tester used a set of tools. These are programs that run on a computer and automate boring parts of the work:
- subfinder finds subdomains (like
shop.example.comwhen the main site isexample.com). - gau collects URLs that are already known publicly, for example from archives.
- nuclei runs a large library of known checks against a site.
- httpx probes hosts to see which ones respond and what they look like.
- paramspider collects URLs that contain parameters (the
?name=valueparts). - ffuf is a fuzzer: it tries many paths or values quickly and reports which ones give an interesting answer.
- Burp Suite is a tool that sits between your browser and the site, so you can see and change every request before it is sent. Think of it as a postal worker who lets you open, read and rewrite every letter you send, and every reply you get back.
The report does not give versions for any of these tools.
After the enumeration turned up configuration files and some directories that did not exist, ffuf was used to explore the site further. Then the tester registered an account and started poking at features.
Finding it
IDOR in the purchase history
IDOR stands for Insecure Direct Object Reference. The idea is simple: a website often identifies things by a number. Your order might be number 1042, your invoice number 8871, your profile number 553. If the site takes that number from your browser and looks up the record without checking that the record belongs to you, then you can change the number and read someone else's record. A useful comparison: imagine a hotel where your room key is just the room number written on a card. If the door only checks that the number is valid, not that it is your number, you can open any room.
After buying an item, it appears in the purchase history and can be viewed. Watching the browser's network tab (the panel in the developer tools that lists every request the page makes), the tester noticed the page fetches an item followed by a number. A number in a URL is exactly the shape that tends to be vulnerable to IDOR, so this was worth testing.
The request was intercepted in Burp and the value was changed. The change succeeded.

The response leaks a lot of information about the customer: their payment receipt, billing addresses and similar data. In other words, personally identifiable information (PII), which is any data that can identify a real person. The tester notes that the Bugcrowd taxonomy would treat this as P1, while admitting uncertainty because they were new to bug bounty.


my data response
The response also contains the image link for the customer's payment receipt.

Data that i should get

data from IDOR
Weak password reset
A password reset is the flow where you click "forgot password", the site emails you a link, and you use that link to set a new password. The link almost always contains a token: a long random string that acts as proof that you received the email. A token is like a cloakroom ticket: whoever holds it can collect the coat, so it must be unguessable and it must only work for the person it was issued to.
Looking for more common bugs, the tester tried the reset password functionality. Intercepted in Burp, it leaks some token, which the tester rates as P4 under the Bugcrowd taxonomy.


The email that arrives points at a URL of the form:
https://redacted.com/reset-password/<token>/<email address>
Line by line: https://redacted.com is the site (the real domain has been replaced with redacted.com here). /reset-password/ is the page that handles the reset. <token> is the long random string that proves you got the email. <email address> is the account the reset is for. The two are placed side by side in the URL, which is a hint: the site may be treating them as two independent pieces of information rather than as a matched pair.
But the token in the email was different from the one seen in Burp, so the tester assumed the Burp token would not work.

It did. Entering the token intercepted from Burp still redirected to the password change page. The email token starts with 6e2 and ends a50, while the token from Burp was XKJ to Y9H.

This is the key observation. The site accepted a token that was not the one it had just emailed out.
This made the tester realise that the IDOR and the weak password reset could be chained for a much larger security impact. Chaining means using one small flaw to enable another, so that the combined effect is bigger than either alone. Here, the IDOR can reveal a customer's email address, and the weak reset accepts a token that is not tied to that email. Put together, that is a path towards account takeover: logging in as someone else.
The admin panel shows the token from Burp, and a little recon could yield a possible admin email. Recon (reconnaissance) means gathering information about a target before attacking it, for example by looking at public pages, job adverts or error messages. The tester did not test the admin panel, since they did not own that account and should not test accounts they do not own.
The login functionality also has no rate limiting and is prone to brute force. Rate limiting is a cap on how many attempts you can make in a given time. Brute force means trying many passwords in a row, often from a list. Without a cap, a program can try thousands of guesses. The tester rates this as likely P5, noting that if an IP block exists it could be bypassed with IP rotation from a Burp extension or a custom script. An IP block means the site refuses requests from an address it has seen too many times; IP rotation means sending requests from many different addresses so the block never triggers.
Business logic flaw in checkout
A business logic flaw is a mistake in the rules of the application rather than in its plumbing. The site does what it was programmed to do, but the rule itself is wrong. A comparison: a shop that says "the price is the number of items times the unit price" is fine, until someone works out that you can enter a negative number of items and get money back.
The next bug is a business logic flaw when purchasing an item, allowing an item to be bought for free or at an unexpected price.
The tester tried buying the highest priced item, which costs around 65,990, with a total cost of 66,240. The interface does not allow subtracting the quantity, but adding more quantity is allowed.

Intercepting the request in Burp, only the quantity could be manipulated.

Setting the quantity to 0 changed the total amount to 251, making an item that costs around 65,990 purchasable for a total price of 251. Reloading the website, the total amount stayed at 251.

The fact that the total survives a reload matters. If the number were only calculated in the browser, reloading would reset it. Because it persists, the server has stored the wrong total as if it were correct.
After completing the transaction the purchase went through, and the tester reported it because they did not want the item shipped.

Later an email arrived saying the order had been cancelled, and it carried an invoice with the same total amount of 251.
Publicly accessible configuration files
The last bug was the web.config and .htaccess files found while enumerating. These are configuration files: small text files that tell a web server how to behave. .htaccess is used by the Apache web server to set rules for a directory. web.config is the equivalent for Microsoft's IIS server. They are not meant to be readable by visitors, because they can reveal how the site is set up.
The .htaccess was new to the tester, who noted possible RCE, DOS and similar outcomes. RCE (remote code execution) means getting the server to run code you supply. DOS (denial of service) means making a service unavailable, for example by exhausting its resources. A few payloads were tried but did not work, and the tester concludes that more research is needed to understand how .htaccess works. The exploitation references given are:
https://github.com/wireghoul/htshells
https://www.acunetix.com/vulnerabilities/web/htaccess-file-readable/
https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/htaccess-file-detected/
https://book.hacktricks.xyz/pentesting/pentesting-web/php-tricks-esp#code-execution-via-.httaccess
Each line is a link to further reading. The first is a collection of tricks for abusing .htaccess files. The second and third are vendor pages describing the "htaccess file readable" and "htaccess file detected" findings. The fourth is a HackTricks page on PHP tricks, including code execution via .htaccess.

.htaccess

web.config
Why it works
The report does not show the server-side code, so the following is inferred from behaviour.
The IDOR is the classic case of an object identifier taken from the request and used to look up a record without checking that the record belongs to the authenticated user. The purchase history endpoint fetches an item by a numeric identifier, and changing that number returns another customer's order, including billing address and a link to the payment receipt image. Authorisation is likely applied to the session but not to the object. In plain words: the site checks that you are logged in, but not that the thing you asked for is yours.
The password reset flaw is that a token observed in Burp, different from the one in the emailed link, was accepted and redirected to the password change page. The reset URL carries both a token and an email address, and the two are evidently not validated as a pair.
The checkout flaw is a missing server-side validation of the quantity. The interface did not allow subtracting the quantity, but the server accepted a quantity of 0 and recalculated the total from it. The recalculated total persists across a reload, which suggests it is stored server-side rather than computed in the browser.
The exposed .htaccess and web.config are a deployment problem: configuration files that should not be publicly accessible were found while enumerating.
What an attacker could do
Through the IDOR, an authenticated customer can read other customers' order records: billing addresses, payment receipts and other PII. The report does not quantify how many records are reachable or whether the identifier space is enumerable beyond the observation that it is a number.
Through the weak reset, a token observed in Burp, different from the emailed one, was accepted and reached the password change page. The tester considers the IDOR and the weak password reset could be chained for a much larger security impact. The admin panel shows the same behaviour, and recon could produce a possible admin email, but this was not tested.
Through the checkout flaw, an item priced around 65,990 could be bought for a total of 251. In this case an item priced around 65,990 was bought for 251, and the order was later cancelled with an invoice for the same 251.
The exposed configuration files could, in the tester's view, lead to RCE or DOS, but the payloads tried did not work and no exploitation is demonstrated.
How to fix it
The fixes implied by the findings are:
- Enforce object-level authorisation on the purchase history endpoint: derive the customer from the session and reject any identifier that does not belong to them.
- Bind reset tokens to the account and to the reset request, validate the token and email address as a pair, and expire tokens after use.
- Validate quantity and price server-side, rejecting zero or negative quantities and recomputing totals from trusted data.
- Deny access to .htaccess, web.config and similar files at the web server level.
- Add rate limiting to login and a stronger password policy, as noted in the P5 findings.
Things to try on other sites
- Numeric object identifiers elsewhere. Look for any endpoint that fetches a record by an incrementing number (orders, invoices, addresses, receipts). A positive result is a response containing another user's data when the number is changed.
- Reset token reuse across requests. Request two resets for the same account and try the token from one against the link of the other. A positive result is reaching the password change page with a mismatched token.
- Reset token not bound to the email. Change the email address in the reset URL while keeping the token. A positive result is a valid reset page for a different account.
- Quantity and price tampering at checkout. Intercept the cart or order request and set quantity to 0, a negative number, or a fraction, and try changing the price field directly. A positive result is a stored total lower than the item price that survives a reload.
- Configuration file exposure. Request
/.htaccess,/web.configand similar paths directly. A positive result is the file contents returned with a 200 status. - Login brute force without lockout. Send repeated authentication attempts and watch for rate limiting or IP blocking. A positive result is continued processing of attempts without throttling.
Glossary
- Account takeover: gaining control of someone else's account, usually by resetting their password or stealing their session.
- Admin panel: a private area of a site used by staff to manage it.
- API: the set of URLs a site's pages call behind the scenes to fetch or change data.
- Authorisation: checking that a logged-in user is allowed to do the specific thing they are asking for.
- Brute force: trying many passwords or guesses in a row until one works.
- Bug bounty: a programme where a site invites people to test it with permission and report problems.
- Bugcrowd taxonomy: Bugcrowd's published guide to how it rates findings, from P1 (most serious) to P5 (least).
- Burp Suite: a tool that sits between your browser and a site so you can read and change requests.
- Business logic flaw: a mistake in the rules of the application rather than in its technical plumbing.
- Chaining: combining two or more small flaws so the combined effect is bigger.
- Configuration file: a small text file that tells a server how to behave, such as
.htaccessorweb.config. - Cookie: a small piece of data a site stores in your browser so it can recognise you on the next request.
- Denial of service (DOS): making a service unavailable, for example by exhausting its resources.
- E-commerce site: an online shop.
- EXIF data: hidden information stored inside a photo file, such as the camera model or location.
- ffuf: a fuzzer that tries many paths or values quickly and reports interesting answers.
- gau: a tool that collects URLs already known publicly, for example from archives.
- httpx: a tool that probes hosts to see which respond and what they look like.
- IDOR (Insecure Direct Object Reference): a flaw where a site takes an identifier from the request and returns a record without checking it belongs to you.
- IP address: the numeric address a device uses on a network.
- IP block: a site refusing requests from an address it has seen too many times.
- IP rotation: sending requests from many different addresses so a block never triggers.
- nuclei: a tool that runs a large library of known checks against a site.
- paramspider: a tool that collects URLs containing parameters.
- Password reset: the flow where you click "forgot password", receive an email link, and set a new password.
- Payload: the specific piece of input you send to try to trigger a bug.
- PII (personally identifiable information): any data that can identify a real person, such as an address or a receipt.
- Rate limiting: a cap on how many attempts you can make in a given time.
- RCE (remote code execution): getting a server to run code you supply.
- Recon (reconnaissance): gathering information about a target before attacking it.
- Request: the message your browser sends to a site asking for something.
- Response: the message the site sends back.
- Session: the site's memory of who you are across many requests, usually kept alive by a cookie.
- Severity: how serious a finding is, often expressed as P1 to P5.
- subfinder: a tool that finds subdomains of a domain.
- Token: a long random string used as proof that something happened, such as receiving a reset email.
- Vulnerability: a mistake in how a site is built that lets someone do something the owner did not intend.
- web.config: the configuration file used by Microsoft's IIS web server.
- .htaccess: the configuration file used by the Apache web server to set rules for a directory.