[Bounty Weekend] Possible Code Execution With Integration Script Tampering
The integration script download endpoint reflected the integration name and role parameters into a generated bash script without sanitisation, allowing an attacker to inject shell commands. An attacker could craft a URL that, when downloaded and run, executes arbitrary commands on the victim's machine.
Bismillah, hello there ! I’m Rifqihz, a penetration tester, bug hunter and a college student who’s currently learning and writing about cyber security related topics.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The integration name and role parameters were reflected into the generated bash script without sanitisation, allowing shell metacharacters to break out of the intended context.
Impact
An attacker could tamper the integration script so that a victim who downloads and runs it executes arbitrary commands, though the report does not demonstrate execution on a victim.
What the attacker needed
Victim downloads and runs the script; attacker can craft a URL
How it was found
- Open the AWS OIDC integration script generation page and enter an integration name and role.
- Click generate to obtain a download URL for the script.
- Modify the integration_name parameter in the URL to include shell metacharacters and commands.
- Download the tampered script and observe the injected commands.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web page generated a shell script for the user to download and run. The page put the user's input (the integration name) directly into that script without cleaning it, so someone could add extra commands. If a victim downloaded and ran the tampered script, those extra commands would run on the victim's computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.