Summary
AVideo contains an authentication bypass in LoginControl::verifyChallenge() that can undermine PGP-based two-factor authentication when session values are unset.
An attacker who already knows a valid password may submit an empty challenge request and obtain authenticated access without completing the second factor.
Affected context
The vulnerability occurs in AVideo authentication flows that use LoginControl::verifyChallenge() to validate a PGP challenge. It becomes risky when the application compares a submitted value with an unset session value using loose equality, allowing an empty or equivalent value to be treated as a valid challenge.
Exploit preconditions
- Attack surface: The AVideo challenge-verification endpoint, including
verifyChallenge.json.php - Required access: Knowledge of a valid account password; no completed PGP second factor is required
- Trigger point: Processing of a challenge-verification request
- Why exploitation is possible: Loose comparison can treat an empty submitted value and an unset session value as equivalent, bypassing the intended challenge check
Why this happens
The underlying bug is an authentication validation error mapped to CWE-287: Improper Authentication. The verification logic uses loose equality when comparing user-controlled challenge data with a session value that may be unset. Because type conversion and empty-value equivalence can make these values compare as equal, the application may accept a request without confirming possession of the required second factor.
Potential impact
- An attacker may bypass PGP-based two-factor authentication
- An attacker could obtain full authenticated access to an affected account
- Account data and application content may be viewed or modified
- Administrative or privileged accounts could expose broader application functionality
- Security records and user trust could be affected
General mitigation guidance
Mitigation generally focuses on making challenge verification explicit, fail-closed, and independent of type coercion.
Common defensive patterns include:
- Use strict comparisons and explicitly reject unset, null, empty, or malformed session values
- Require a valid, server-generated challenge before accepting second-factor verification
- Treat missing session state as an authentication failure rather than as an equivalent value
- Centralize authentication and MFA validation in well-tested security components
- Apply least privilege to authenticated roles and administrative accounts
- Reduce trust in client-supplied challenge fields by deriving verification state from protected server-side data
How teams detect issues like this
Organizations can look for:
- Static analysis findings involving loose equality in authentication or authorization checks
- Code review signals where nullable or unset session values are compared directly with request parameters
- Tests covering empty, null, missing, malformed, and type-confused challenge inputs
- Policy checks requiring strict comparisons and fail-closed handling in MFA paths
- Authentication logs showing successful challenge verification with missing or empty challenge data
Automated review tools can help identify weak comparison patterns, although findings should be validated against the application's session and authentication flow.

