# GHSA-5RPH-JQCF-2X36: Pending 2FA sessions can update Login plugin profile data through unprotected page forms

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-09-23
- Modified: 2026-09-23

## Affected versions

- getgrav/grav-plugin-login (Packagist): through 3.9.8

## Description

## Summary

With front-end 2FA enabled, a successful password check creates a pending session whose user is authenticated but not yet authorized. The Login plugin's profile-update form handler checks that the session user exists, but does not require the session to be fully authorized. A page without an access rule can therefore invoke the profile-update action while the second-factor challenge is still pending.

## Affected versions

Static review confirms the vulnerable code in grav-plugin-login 3.9.8. The relevant 2FA behavior first appears in release 2.7.0, so the recommended affected range is 2.7.0 through 3.9.8. Historical releases were not dynamically tested.

## Details

`processUserProfile()` validates the submitted form and checks `user->exists()`, then updates fields allowed by the Login plugin's profile configuration. During a delayed 2FA login, the user exists and is authenticated, but `authorized` remains false. The normal profile page is protected and rejects that pending session; a page without protected access returns before that gate and can still dispatch the same `update_user` form action.

## Impact

An attacker who has the victim's password and can publish the required page form can change allowed profile data before completing the victim's second factor. Where `twofa_enabled` is an allowed profile field, this can remove the second-factor requirement and permit account takeover. This crosses the 2FA trust boundary.

## Patches

A patched release is not yet available. The fix must require a fully authorized session before any profile mutation. Version details will be added when the fix is tested and tagged.

## Credits

Reported by @redwolf1919.

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-5rph-jqcf-2x36

Page: https://cve.now/GHSA-5RPH-JQCF-2X36

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
