PostgreSQL database not accepting edits
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the request against /workshop/api/shop/apply_coupon and inspect how the applied_coupon table is handled in the crAPI config file. Check the relevant logs for the 500 response and determine whether database edits are supported; done means the issue documents the required configuration or expected error.
Written by the indexing model from the issue text.
Description
Hi,
In Challenge 13, I have found the coupon_code parameter in the /workshop/api/shop/apply_coupon to be injectable.
I also found the applied_coupon table in the PostgreSQL database.
The endpoint accepts the following injection and returns the database version:
"coupon_code":"TRAC075'; SELECT version() --+"
But it refuses the following and returns a 500 error:
"coupon_code":"TRAC075'; DELETE FROM applied_coupon WHERE coupon_code=TRAC075 --+"
Is there anything that needs to be changed in the crAPI config file to allow user edits to be made to the database? I noticed there are restrictions for shell injection.
Thanks,
Edw.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 645
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OWASP/crAPI
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 1/5 Under an hour Newbie friendliness 1/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·