Summary
RomM contains multiple unrestricted file upload vulnerabilities that allow authenticated users to upload malicious SVG or HTML files. When these files are accessed the browser executes embedded JavaScript, leading to stored Cross-Site Scripting (XSS) which when combined with a CSRF misconfiguration they lead to achieve full administrative account takeover, creating a rogue admin account, escalating the attacker account role to admin, and much more.
Affected Version: 4.4.0 (latest Docker image at time of testing - November 2025)
Details
I found 2 issues if chained together would lead to admin ATO and much more, these 2 issues are CSRF misconfiguration & XSS via arbitrary file upload.
CSRF Misconfiguration
[REDACTED]
Affected Code
Affected backend code exists in 2 files (main.py & handler/auth/middleware.py)
Mitigation / Fix
Bind CSRF token to user's session instead of using a Global Tokens Pool.
Arbitrary File Upload leading to Cross-Site-Scripting (XSS)
[REDACTED]
Affected Code
[REDACTED]
Mitigation / Fix
- Create a whitelist for the allowed files formats (e.g. png, jpg, jpeg)
- Do some other checks on the uploaded file such as checking the MIME type, magic bytes, or actual file format.
- Also check the uploaded file size to avoid malicious users uploading large files leading to Denial-of-Service (DoS) attacks.
- If it's intended to let users upload their Saves/States as large as they want, at least do some checks when it comes to users avatar or ROMs covers and other endpoints only needs images.
Admin Account Takeover
Chaining the above 2 issues leads to several critical impact, but I'll focus on Taking over the Admin's account for simplicity since fixing the root cause would fix the rest of the attack scenarios.
We can use any of the above arbitrary file upload, but I'd use the Avatar one in this Proof-of-Concept.
[REDACTED]
Mitigation / Fix
- Fix both issues, CSRF & Unrestricted file upload like mentioned above
- Plus, on the change password function, require the old password.
Impact
Chaining CSRF misconfiguration + XSS via arbitrary file upload allows an authenticated low privileged user to do:
- Admin account takeover (password change without the need of an old password)
- Rogue admin account creation
- Privilege escalation (viewer/editor → admin)
- Account deletion/disable
- Full application compromise
Summary
RomM contains multiple unrestricted file upload vulnerabilities that allow authenticated users to upload malicious SVG or HTML files. When these files are accessed the browser executes embedded JavaScript, leading to stored Cross-Site Scripting (XSS) which when combined with a CSRF misconfiguration they lead to achieve full administrative account takeover, creating a rogue admin account, escalating the attacker account role to admin, and much more.
Affected Version:
4.4.0(latest Docker image at time of testing - November 2025)Details
I found 2 issues if chained together would lead to admin ATO and much more, these 2 issues are CSRF misconfiguration & XSS via arbitrary file upload.
CSRF Misconfiguration
[REDACTED]
Affected Code
Affected backend code exists in 2 files (
main.py&handler/auth/middleware.py)Mitigation / Fix
Bind CSRF token to user's session instead of using a Global Tokens Pool.
Arbitrary File Upload leading to Cross-Site-Scripting (XSS)
[REDACTED]
Affected Code
[REDACTED]
Mitigation / Fix
Admin Account Takeover
Chaining the above 2 issues leads to several critical impact, but I'll focus on Taking over the Admin's account for simplicity since fixing the root cause would fix the rest of the attack scenarios.
We can use any of the above arbitrary file upload, but I'd use the
Avatarone in this Proof-of-Concept.[REDACTED]
Mitigation / Fix
Impact
Chaining CSRF misconfiguration + XSS via arbitrary file upload allows an authenticated low privileged user to do: