Summary
FaustWP fails to authenticate the initialization vector used to decrypt certain authorization tokens. A logged-in non-administrator who obtains an authorization code may alter the token contents without invalidating its HMAC, potentially gaining Administrator-level WordPress access.
Affected context
The issue occurs in FaustWP authentication handling when token encryption uses CBC mode but the initialization vector is excluded from HMAC coverage. Deployments are at risk when a lower-privileged authenticated user can obtain an authorization code through the token-generation endpoint and the resulting token is accepted for WordPress REST API authorization.
Exploit preconditions
- Attack surface: FaustWP authentication endpoints and WordPress REST API authorization
- Required access: A valid logged-in non-administrator account
- Trigger point: Generation and subsequent processing of an authorization token
- Why exploitation is possible: The initialization vector is not authenticated, allowing token fields affected by CBC decryption to change while the ciphertext HMAC remains valid
Why this happens
The authentication design verifies the ciphertext but omits the corresponding initialization vector from the integrity check. In CBC mode, changing an unauthenticated initialization vector can predictably alter the first decrypted block, including security-sensitive token fields such as token type or user identifier. This is an instance of CWE-345, Insufficient Verification of Data Authenticity, and can also enable CWE-639-style authorization decisions based on manipulated identifiers.
Potential impact
- An attacker could bypass intended authorization boundaries
- An attacker may obtain Administrator-level WordPress REST API access
- An attacker could create or modify administrator accounts
- An attacker may install or alter plugins
- An attacker could execute arbitrary code through privileged WordPress functionality
- An attacker could compromise site content, credentials, or connected systems
General mitigation guidance
Mitigation generally focuses on authenticating every value that influences token decryption and authorization decisions.
Common defensive patterns include:
- Use authenticated encryption modes that bind ciphertext, initialization vectors, and associated metadata together
- If an encrypt-then-MAC design is retained, include the initialization vector and relevant token context in the MAC input
- Validate token type, subject identity, audience, expiry, and privilege claims independently after decryption
- Avoid deriving authorization solely from mutable decrypted identifiers
- Apply least privilege to application accounts and WordPress service integrations
- Rotate affected signing or encryption secrets and review existing tokens when compromise is suspected
- Restrict privileged REST API operations and plugin-management capabilities where they are not required
How teams detect issues like this
Detection can include static analysis and code review for encryption or MAC routines that omit initialization vectors, nonces, headers, or authentication metadata from integrity coverage. Reviewers can trace token-generation and token-validation flows to confirm that authenticated claims are independently validated and that privilege decisions do not rely solely on decrypted user-controlled values. Runtime monitoring may flag unusual authorization-code use, sudden elevation to administrator identities, administrator-account creation, plugin installation, or unexpected REST API activity. Security policies can require authenticated encryption for new token formats and automated review tools can identify incomplete MAC constructions.

