GHSA-43GM-9RR3-CX7G
Vulnerability from github – Published: 2026-08-18 20:47 – Updated: 2026-08-18 20:47Summary
A stored Cross-Site Scripting (XSS) vulnerability in Froxlor's DNS editor allows an authenticated user with DNS editor access (customer role) to inject arbitrary JavaScript into any administrator's browser session. When an administrator views the DNS configuration of an affected domain, the payload executes automatically — enabling complete admin account takeover, credential theft, and full server compromise.
Details
Three code locations combine to create this vulnerability:
1. Input validation does not strip HTML special characters — lib/Froxlor/Api/Commands/DomainZones.php:158
// Only strips non-printable chars. < and > (0x3C/0x3E) pass through unmodified.
$content = preg_replace('/[^\x09\x20-\x7E]/', '', $content);
$content = Dns::encloseTXTContent($content); // only wraps in quotes, no HTML encoding
2. Display callback returns raw HTML without escaping — lib/Froxlor/UI/Callbacks/Text.php:95
public static function wordwrap(array $attributes): string {
return wordwrap($attributes['data'], 100, '<br>', true); // no htmlspecialchars()
}
3. Twig template renders the callback output with |raw — templates/Froxlor/table/table.html.twig:57
{% else %}
{{ td.data|raw }} {# string from wordwrap() — rendered without escaping #}
{% endif %}
The DNS editor table assigns [Text::class, 'wordwrap'] as the callback for the content column (lib/tablelisting/tablelisting.dns.php:58). The callback returns a non-iterable string, so the template falls to the |raw branch.
Additionally, the Content Security Policy header (lib/Froxlor/UI/Panel/UI.php:140) includes 'unsafe-inline', rendering CSP completely ineffective as a mitigation:
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; ...
PoC
Prerequisites: Froxlor running with DNS enabled (system.dnsenabled = 1), at least one domain with DNS editor enabled, and a user account (customer or admin) with DNS editor access.
Step 1 — Inject the payload (via web UI or API as any DNS-enabled user):
Navigate to the DNS editor for any domain, add a TXT record with:
- Record: @
- Type: TXT
- Content: <img src=x onerror=alert(document.domain)>
Step 2 — Trigger:
No interaction is required beyond page navigation. The payload fires automatically on page load the moment any logged-in administrator visits:
http://TARGET/admin_domains.php?page=domaindnseditor&domain_id=<id>
This URL is part of the normal admin workflow (domain management → DNS editor). No clicking, no form submission, no special conditions — visiting the URL is sufficient.
Verify via command line (login + fetch in one line):
T=$(curl -sc /tmp/c http://TARGET/index.php | grep -oP 'csrf-token" content="\K[^"]+') && \
curl -sc /tmp/c -b /tmp/c http://TARGET/index.php \
-d "loginname=admin&password=PASS&dologin=1&send=send&csrf_token=$T" -o /dev/null && \
curl -sb /tmp/c "http://TARGET/admin_domains.php?page=domaindnseditor&domain_id=ID" \
| grep -o '<img src=x[^>]*>'
Expected output confirming unescaped payload in page source:
<img src=x onerror=alert(document.domain)>
In a browser session the alert() fires immediately — no clicks required.
Impact
Type: Stored Cross-Site Scripting (Stored XSS)
Who is impacted: Any Froxlor installation with DNS editor functionality enabled. The attack requires a low-privilege customer account with dnsenabled = 1 — a standard feature granted to hosting customers. The victim is any administrator who views the affected domain's DNS configuration.
A real-world attacker would replace alert() with a payload that silently exfiltrates the admin session cookie, then uses it to create a backdoor admin account, read all customer credentials, or execute arbitrary commands on the underlying server through Froxlor's system configuration interface.
Fix
Apply one of the following:
Option A (recommended) — Remove |raw from the table template:
{# templates/Froxlor/table/table.html.twig:57 #}
{{ td.data }} {# Twig auto-escaping handles it #}
Callbacks that intentionally return HTML (e.g. action buttons) should return a structured array with a macro key instead of a raw string.
Option B — Escape in the callback:
// lib/Froxlor/UI/Callbacks/Text.php
public static function wordwrap(array $attributes): string {
return wordwrap(htmlspecialchars($attributes['data'], ENT_QUOTES, 'UTF-8'), 100, '<br>', true);
}
Option C — Sanitize at input:
// lib/Froxlor/Api/Commands/DomainZones.php after line 160
$content = htmlspecialchars($content, ENT_QUOTES, 'UTF-8');
Also remove 'unsafe-inline' and 'unsafe-eval' from the CSP header in lib/Froxlor/UI/Panel/UI.php:140.
If possible, please apply for a CVE when publishing.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.3.7"
},
"package": {
"ecosystem": "Packagist",
"name": "froxlor/froxlor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.3.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-54347"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-18T20:47:53Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nA stored Cross-Site Scripting (XSS) vulnerability in Froxlor\u0027s DNS editor allows an authenticated user with DNS editor access (customer role) to inject arbitrary JavaScript into any administrator\u0027s browser session. When an administrator views the DNS configuration of an affected domain, the payload executes automatically \u2014 enabling complete admin account takeover, credential theft, and full server compromise.\n\n---\n\n### Details\n\nThree code locations combine to create this vulnerability:\n\n**1. Input validation does not strip HTML special characters** \u2014 `lib/Froxlor/Api/Commands/DomainZones.php:158`\n\n```php\n// Only strips non-printable chars. \u003c and \u003e (0x3C/0x3E) pass through unmodified.\n$content = preg_replace(\u0027/[^\\x09\\x20-\\x7E]/\u0027, \u0027\u0027, $content);\n$content = Dns::encloseTXTContent($content); // only wraps in quotes, no HTML encoding\n```\n\n**2. Display callback returns raw HTML without escaping** \u2014 `lib/Froxlor/UI/Callbacks/Text.php:95`\n\n```php\npublic static function wordwrap(array $attributes): string {\n return wordwrap($attributes[\u0027data\u0027], 100, \u0027\u003cbr\u003e\u0027, true); // no htmlspecialchars()\n}\n```\n\n**3. Twig template renders the callback output with `|raw`** \u2014 `templates/Froxlor/table/table.html.twig:57`\n\n```twig\n{% else %}\n {{ td.data|raw }} {# string from wordwrap() \u2014 rendered without escaping #}\n{% endif %}\n```\n\nThe DNS editor table assigns `[Text::class, \u0027wordwrap\u0027]` as the callback for the `content` column (`lib/tablelisting/tablelisting.dns.php:58`). The callback returns a non-iterable string, so the template falls to the `|raw` branch.\n\nAdditionally, the Content Security Policy header (`lib/Froxlor/UI/Panel/UI.php:140`) includes `\u0027unsafe-inline\u0027`, rendering CSP completely ineffective as a mitigation:\n\n```\nContent-Security-Policy: default-src \u0027self\u0027; script-src \u0027self\u0027 \u0027unsafe-inline\u0027 \u0027unsafe-eval\u0027; ...\n```\n\n---\n\n### PoC\n\u003cimg width=\"2025\" height=\"1144\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f6808b24-c4b6-4bd2-9673-d7ddc4939794\" /\u003e\n\n\n**Prerequisites:** Froxlor running with DNS enabled (`system.dnsenabled = 1`), at least one domain with DNS editor enabled, and a user account (customer or admin) with DNS editor access.\n\n**Step 1 \u2014 Inject the payload** (via web UI or API as any DNS-enabled user):\n\nNavigate to the DNS editor for any domain, add a TXT record with:\n- Record: `@`\n- Type: `TXT`\n- Content: `\u003cimg src=x onerror=alert(document.domain)\u003e`\n\n**Step 2 \u2014 Trigger:**\n\nNo interaction is required beyond page navigation. The payload fires automatically on page load the moment any logged-in administrator visits:\n\n```\nhttp://TARGET/admin_domains.php?page=domaindnseditor\u0026domain_id=\u003cid\u003e\n```\n\nThis URL is part of the normal admin workflow (domain management \u2192 DNS editor). No clicking, no form submission, no special conditions \u2014 visiting the URL is sufficient.\n\n**Verify via command line** (login + fetch in one line):\n\n```bash\nT=$(curl -sc /tmp/c http://TARGET/index.php | grep -oP \u0027csrf-token\" content=\"\\K[^\"]+\u0027) \u0026\u0026 \\\ncurl -sc /tmp/c -b /tmp/c http://TARGET/index.php \\\n -d \"loginname=admin\u0026password=PASS\u0026dologin=1\u0026send=send\u0026csrf_token=$T\" -o /dev/null \u0026\u0026 \\\ncurl -sb /tmp/c \"http://TARGET/admin_domains.php?page=domaindnseditor\u0026domain_id=ID\" \\\n | grep -o \u0027\u003cimg src=x[^\u003e]*\u003e\u0027\n```\n\nExpected output confirming unescaped payload in page source:\n\n```\n\u003cimg src=x onerror=alert(document.domain)\u003e\n```\n\nIn a browser session the `alert()` fires immediately \u2014 no clicks required.\n\n---\n\n### Impact\n\n**Type:** Stored Cross-Site Scripting (Stored XSS)\n\n**Who is impacted:** Any Froxlor installation with DNS editor functionality enabled. The attack requires a low-privilege customer account with `dnsenabled = 1` \u2014 a standard feature granted to hosting customers. The victim is any administrator who views the affected domain\u0027s DNS configuration.\n\nA real-world attacker would replace `alert()` with a payload that silently exfiltrates the admin session cookie, then uses it to create a backdoor admin account, read all customer credentials, or execute arbitrary commands on the underlying server through Froxlor\u0027s system configuration interface.\n\n---\n\n### Fix\n\nApply **one** of the following:\n\n**Option A (recommended) \u2014 Remove `|raw` from the table template:**\n\n```twig\n{# templates/Froxlor/table/table.html.twig:57 #}\n{{ td.data }} {# Twig auto-escaping handles it #}\n```\n\nCallbacks that intentionally return HTML (e.g. action buttons) should return a structured array with a `macro` key instead of a raw string.\n\n**Option B \u2014 Escape in the callback:**\n\n```php\n// lib/Froxlor/UI/Callbacks/Text.php\npublic static function wordwrap(array $attributes): string {\n return wordwrap(htmlspecialchars($attributes[\u0027data\u0027], ENT_QUOTES, \u0027UTF-8\u0027), 100, \u0027\u003cbr\u003e\u0027, true);\n}\n```\n\n**Option C \u2014 Sanitize at input:**\n\n```php\n// lib/Froxlor/Api/Commands/DomainZones.php after line 160\n$content = htmlspecialchars($content, ENT_QUOTES, \u0027UTF-8\u0027);\n```\n\nAlso remove `\u0027unsafe-inline\u0027` and `\u0027unsafe-eval\u0027` from the CSP header in `lib/Froxlor/UI/Panel/UI.php:140`.\n\n---\nIf possible, please apply for a CVE when publishing.",
"id": "GHSA-43gm-9rr3-cx7g",
"modified": "2026-08-18T20:47:53Z",
"published": "2026-08-18T20:47:53Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/froxlor/froxlor/security/advisories/GHSA-43gm-9rr3-cx7g"
},
{
"type": "WEB",
"url": "https://github.com/froxlor/froxlor/commit/a1d8f425b11ef7597949018814afa056a842cba0"
},
{
"type": "PACKAGE",
"url": "https://github.com/froxlor/froxlor"
},
{
"type": "WEB",
"url": "https://github.com/froxlor/froxlor/releases/tag/2.3.8"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Froxlor: Stored XSS in DNS TXT Record Content Allows Customer-to-Admin Account Takeover"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.