Skip to content

Report 5 - Flora - UMassCTF 2026 /web/order66#78

Open
florayq wants to merge 5 commits intoCUCTF:mainfrom
florayq:order66
Open

Report 5 - Flora - UMassCTF 2026 /web/order66#78
florayq wants to merge 5 commits intoCUCTF:mainfrom
florayq:order66

Conversation

@florayq
Copy link
Copy Markdown
Contributor

@florayq florayq commented Apr 12, 2026

Flora's fifth writeup - web challenge from UMassCTF 2026 - XSS

Copy link
Copy Markdown
Contributor

@mmstoic mmstoic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall a solid writeup! Please make the requested changes and the writeup will be good to go!

# UMass 2026: web/order66

## Context & Vulnerability
This is an application with 66 order boxes and a link to the chancellor (admin) as well as a url 'logs for chancellor'. While testing out the site, you notice that you can only input into one of the orders. Additionally, regardless of the input, the link in the url box does not change, whereas inserting this link into the chancellor/admin does not work. The chancellor/admin also does not take https, only http connections.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Additionally, regardless of the input, the link in the url box does not change, whereas inserting this link into the chancellor/admin does not work." Not sure what you mean by this? Could you clarify by "does not work"? Also, I think an image of the webpage would be helpful here!


`is_payload_present = "<script" in current_content.lower() or "alert(" in current_content.lower()`

Our goal is the flag which is in the admin's cookie (see app.js). Notice how secure is set to false meaning the browser will transmit this cookie over http connections which is what the chancellor/admin takes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor detail, but formatting it like secure is set to false is more clear.

## Exploitation
We notice from the `hello_word()` function that there is one vulnerable index `current_vuln_index` that means one of the 66 boxes allows for XSS with javascript.

```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also minor detail, but would be helpful if you showed more context of the loop, like what its looping through (what is i?)

if i == current_vuln_index and ("<script" in content.lower() or "alert(" in content.lower()):
is_payload_present = True
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it important that "index, uid, and seed don't change"? And is this info that you're putting into the webpage? Again, an image could be helpful here.


Since we see that the index, uid, and seed don't change when we enter into the order boxes, we can test each box to see which one is vulnerable with `<script>alert(1)</script>`

The box that allows the alert to go through is the vulnerable box which we can inject with a payload we want the chancellor/admin to execute. We can use `<script>console.log(document.cookie)</script>` in order to dump the cookie into the output of the chancellor/admin.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!


The box that allows the alert to go through is the vulnerable box which we can inject with a payload we want the chancellor/admin to execute. We can use `<script>console.log(document.cookie)</script>` in order to dump the cookie into the output of the chancellor/admin.

app.py also contains the endpoint `/view/<uid>/<int:seed>` which is what we want to add to the end of the ctf url to input to the chancellor/admin. Doing so dumps the flag.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does attaching the seed dump the flag? Can you show the relevant code that supports this?

Failed to load resource: the server responded with a status of 404 (NOT FOUND)
```

## Remediation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some grammar checks in the remediation section here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants