Skip to content
SSRF Disclosed report Intermediate

SSRF in Functional Administrative Support Tool pdf generator (████) [HtUS]

The PDF generator allowed injection of JavaScript into a form field, which was executed server-side, enabling an attacker to make the server fetch AWS instance metadata and expose temporary credentials.

codeprivate Follow

Originally disclosed on HackerOne

Bounty$4,000 Critical 9.4 View original
  • Triaged in 15 hours
  • Fixed in 41 days
  • Paid in 23 hours
  • Disclosed after 2 months

Summary:

I found that it is possible to inject a javascript payload during the PDF form creation process, which is then executed by the checklist application server.

Vulnerable Software: Functional Administrative Support Tool (FAST) v1.0

Intro:

██████████

Administrative clerks create a dynamic action items by guiding a███ through targeted questions designed to draw out required administrative actions that are required and trigger of additional processes that need to be completed.

After completing the question and answer process ( point 3. Get Action Items ) the application offers 2 options: Send the report by Email or print (See PDF).

When the user clicks on (View PDF) they are redirected to the URL:███████/print/checklist/fast_session_XXXXXX.pdf . This is where the user will have access to his PDF form generated dynamically by the███ system.

note: XXXXXX is the "session" assigned by the system to identify a form.

Steps To Reproduce:

  1. Go to███/ and select "BEGIN NEW SESSION", enter a MCC code Ex. "h99" and SUBMIT

  2. with burp suite on, select a process, and fill in the data randomly up to point 3. (EDIPI code is a 10 chars long number. Ex. 0123456789) - click CONTINUE

  3. in point 3, (Get Action Items) click on PRINT (VIEW PDF) - A window will open with the dynamically generated PDF exposing the data that we complete.

  4. observe in burp suite the last request made to /api/save/ proceed to right click and send to "Repeater"

  5. modify value "name" of the json object "globalInfo" by the payload:

</script><script>document.write('<iframe src=\"http://███/latest/meta-data/iam/security-credentials/EC2CloudWatchRole\" width=1000px height=1000px>')</script>

and click Send request. If everything went well, the server responds "status ok"

  1. Refresh form URL. Ex.████████/print/checklist/fast_session_XXXXXX.pdf

for this PoC. AWS secretkeys were accessed:

{ "Code" : "Success", "LastUpdated" : "2022-07-06T02:57:53Z", "Type" : "AWS-HMAC", "AccessKeyId" : "███", "SecretAccessKey" : "████", "Token" :"██████", "Expiration" : "2022-07-06T09:04:49Z"}

Supporting Material/References:

Impact

An attacker can inject malicious javascript payloads in the PDF generation process and executed by the checklist application server. An attacker could use this to Steal credentials or other sensitive information from ████ AWS Instance.

The original report as published on HackerOne, by codeprivate. 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

Impact

An attacker could steal credentials or other sensitive information from the AWS instance.

What the attacker needed

Access to the application; ability to intercept and modify requests

How it was found

  1. Start a new session by entering a code and submitting.
  2. Fill in the form up to the action items step.
  3. Click print/view PDF to generate the PDF.
  4. Capture the save request and send it to Repeater.
  5. Modify the name field with a script payload and send the request.
  6. Refresh the PDF URL to trigger the payload.

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.

The application builds a PDF from user-supplied data. By putting a script in a form field, the attacker made the server run that script, which then asked the cloud provider for secret keys. This is dangerous because those keys can be used to access other cloud resources.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by codeprivate

View all

1 more disclosed report, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.