Summary
The Form Notify plugin for WordPress contains an authentication bypass flaw where user-controlled cookie data is trusted to decide which account to log in after a LINE OAuth flow.
Because the plugin does not verify that the LINE account is actually associated with the email stored in the form_notify_line_email cookie, unauthenticated attackers can log into arbitrary WordPress accounts, including administrators, by combining their own LINE OAuth session with a forged cookie.
Affected context
This vulnerability arises in WordPress sites that:
- Use the Form Notify plugin with LINE OAuth integration enabled
- Allow LINE logins where LINE may not supply an email address (a common configuration)
- Rely on the
form_notify_line_emailcookie to map an OAuth login to a WordPress user
The risk materializes when cookie values are treated as authoritative identifiers for user accounts without binding them to the actual OAuth identity or validating their origin.
Exploit preconditions
- Attack surface: Public-facing WordPress sites exposing the Form Notify LINE OAuth login endpoint.
- Required access: No prior authentication required; attackers only need the ability to:
- Initiate a LINE OAuth flow with their own LINE account
- Set or manipulate the
form_notify_line_emailcookie in their browser (e.g., via browser tools or crafted HTTP requests) - Trigger point: Completion of the LINE OAuth callback where the plugin attempts to associate the session with a WordPress account.
- Why exploitation is possible: The plugin falls back to the
form_notify_line_emailcookie when LINE does not provide an email and does not verify that: - The cookie value belongs to the currently authenticated LINE identity, or
- The cookie was set by a trusted server-side process.
As a result, arbitrary user emails can be supplied via the cookie and treated as the account to authenticate.
Why this happens
The underlying issue is improper authentication and identity binding, mapped to CWE-287: Improper Authentication.
Instead of deriving the local WordPress user solely from attributes strongly tied to the LINE OAuth identity (such as a unique LINE user ID), the plugin trusts a client-side cookie (form_notify_line_email) as a primary account selector whenever the OAuth provider omits an email.
This design conflates untrusted client-controlled state with authoritative identity information, breaking the assumption that authenticated sessions are uniquely bound to the authentic OAuth user.
The insecure pattern is:
- Use of client-managed cookies as a decisive source for user identity
- No server-side verification that the cookie corresponds to the OAuth principal
- No cryptographic binding, signing, or linkage between the OAuth account and the local account being authenticated.
Potential impact
- Unauthorized access to arbitrary WordPress user accounts by supplying their email address.
- Full administrator account takeover, including:
- Installing or modifying plugins and themes
- Editing site content and configuration
- Creating or deleting user accounts
- Escalation from anonymous user to privileged roles in a single login flow.
- Secondary compromise of integrated systems (APIs, content, or data managed through the WordPress admin).
- Long-term persistence by creating backdoor accounts or modifying site behavior.
General mitigation guidance
Effective mitigations focus on strengthening identity binding and eliminating trust in client-controlled identifiers for authentication decisions:
- Base account mapping on attributes guaranteed by the OAuth provider (e.g., unique provider user ID), not on client-supplied fields like cookies.
- Introduce a strict server-side association between a LINE user identifier and a WordPress account, stored and validated on every login.
- Treat any client-supplied email or identity hints (including cookies) as advisory at most, not as authoritative, and always re-validate them against server-side records.
- Employ signed, tamper-evident tokens for any state that influences authentication, ensuring they are generated and validated only by the server.
- Enforce least privilege in plugin behavior, avoiding automatic login or account linking without explicit, validated consent flows.
- Design login flows so that absence of a critical identity attribute (like email) results in a controlled fallback (e.g., account linking step) rather than relying on unverified client hints.
How teams detect issues like this
To detect and monitor similar issues, organizations can:
- Use static analysis or secure code review to flag:
- Authentication logic that reads from cookies or other client inputs to decide "which user" to authenticate
- Any fallback path in OAuth/login flows that bypasses identity checks when provider attributes are missing
- Review OAuth integration code paths for:
- Direct mapping from client-controlled fields (cookies, query parameters, POST bodies) to user identity
- Absence of validation between external identity (provider user ID) and local account records
- Implement application-level logging that records:
- OAuth provider user identifiers
- Mapped local account IDs
- Anomalies where a single provider identity logs into multiple local accounts or vice versa
- Apply security policies in CI/CD pipelines that:
- Require security review of authentication and SSO-related changes
- Enforce use of standardized, vetted authentication libraries rather than ad-hoc logic.

