# CVE-2026-7820: pgAdmin 4: Account-lockout bypass via Flask-Security default /login view

- Severity: Medium 6.9 (CVSS:4.0, scored by PostgreSQL) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-05-11T14:35:53.492Z
- Modified: 2026-10-26T18:10:00.173Z
- Also known as: GHSA-hv9p-2pqf-r5w3, PYSEC-2026-2869
- Weaknesses: CWE-307
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: PostgreSQL

## Description

Improper restriction of excessive authentication attempts (CWE-307) in pgAdmin 4.

pgAdmin enforces MAX_LOGIN_ATTEMPTS only inside its custom /authenticate/login view. Flask-Security's default /login view, which is registered automatically by security.init_app() and is reachable on every server, never consulted the User.locked field: pgAdmin's User model relied on Flask-Security's UserMixin.is_locked() (which always returns 'not locked') and Flask-Login's is_active (which only checks the active column, not locked). An attacker who triggered an account lockout via /authenticate/login could therefore obtain a session by re-submitting valid credentials directly to /login, defeating the brute-force-protection control for accounts using the INTERNAL authentication source. The same bypass also means that login attempts via /login are never rate-limited, so an attacker can perform an unbounded online password-guessing attack against INTERNAL accounts regardless of MAX_LOGIN_ATTEMPTS.

Fix overrides User.is_active and User.is_locked() so the locked column is enforced on every authentication path. LDAP, OAuth2, Kerberos, and Webserver users are not reachable by this bypass because they have no local password and are rejected by Flask-Security's LoginForm.validate before the locked check; the lockout itself is also internal-only (the /authenticate/login view filters by auth_source=INTERNAL).

This issue affects pgAdmin 4: before 9.15.

(As written by CVE List.)

## Affected

- pgadmin.org pgAdmin 4: before 9.15
- pgadmin4 (PyPI): before 9.15
- pgadmin pgadmin_4: before 9.15

## Every score

- PostgreSQL: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PostgreSQL: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/pgadmin-org/pgadmin4/issues/9904> (issue-tracking, patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-7820> (advisory)
- <https://github.com/pgadmin-org/pgadmin4/commit/d336c1e78> (web)
- <https://github.com/pgadmin-org/pgadmin4> (package)
- <https://pypi.org/project/pgadmin4> (package)
- <https://github.com/advisories/GHSA-hv9p-2pqf-r5w3> (advisory)

## Sources

- CVE List: [CVE-2026-7820](https://www.cve.org/CVERecord?id=CVE-2026-7820), CVE Terms of Use, modified 2026-05-11
- GitHub Advisory Database: [GHSA-hv9p-2pqf-r5w3](https://github.com/advisories/GHSA-hv9p-2pqf-r5w3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-7820](https://nvd.nist.gov/vuln/detail/CVE-2026-7820), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2869](https://osv.dev/vulnerability/PYSEC-2026-2869), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-7820 · Whole record: https://cve.day/CVE-2026-7820.json · Rebuilt by cve.day 2026-11-25T22:59:21.208Z
