The “Who Needs Secure Attachments Anyway?” Saga
Uploaded support ticket attachments were accessible via unprotected URLs without authentication, allowing anyone to view sensitive files. Additionally, an uploaded XML file with an XSS payload executed when opened in a browser, bypassing Cloudfront protections.
Published on medium.com
Improper Access Control — Generic (CWE-284) Also Featuring: Reflected XSS (The Plot Twist You Didn’t See Coming)
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
Likely, the application stored uploaded attachments in a publicly accessible location without any access control checks, and failed to sanitise file contents before rendering them in the browser.
Impact
Unauthenticated users could access sensitive customer files, and an attacker could execute reflected XSS by uploading a malicious XML file, potentially bypassing Cloudfront protections.
What the attacker needed
A user account; ability to upload files; victim opens the attachment URL
The fix
The support module was removed entirely, which eliminated the vulnerability.
How it was found
- Log into the application.
- Navigate to the 'Raise an Issue' option.
- Fill in the mandatory fields (subject, description).
- Attach a file to the support request.
- Intercept the submission request with a proxy.
- Observe the unprotected URL of the attachment in the request.
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.
When you upload a file to a website, it should only be viewable by authorised people. Here, the file's web address was public, so anyone who found it could open it without logging in. Also, a file containing a script could run that script in the browser, which is a cross-site scripting (XSS) attack.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.