# CVE-2026-7818: pgAdmin 4: Unsafe deserialization (CWE-502) in file-backed session manager leads to remote code execution

- Severity: High 7.3 (CVSS:4.0, scored by PostgreSQL) `CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/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.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-05-11T14:35:52.092Z
- Modified: 2026-10-26T18:10:00.173Z
- Also known as: GHSA-4rhg-h8f2-v4jm, PYSEC-2026-2865
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: PostgreSQL

## Description

Deserialization of untrusted data (CWE-502) in pgAdmin 4 FileBackedSessionManager.

The session manager performed unsafe deserialization of session-file contents (using Python's standard object-serialization module) before performing any HMAC integrity check. Any file dropped into the sessions directory was deserialized unconditionally. An authenticated user with write access to the sessions directory (whether by misconfiguration or in combination with another path-traversal flaw) could plant a crafted serialized payload to achieve operating-system level remote code execution under the pgAdmin process identity.

Fix prepends a 64-byte hex SHA-256 HMAC over the session body, computed with SECRET_KEY, and verifies it via hmac.compare_digest before any deserialization. The check is raised (rather than asserted) on empty SECRET_KEY so it is not stripped under -O.

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 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PostgreSQL: CVSS:4.0 7.3 High `CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/pgadmin-org/pgadmin4/issues/9901> (issue-tracking, patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-7818> (advisory)
- <https://github.com/pgadmin-org/pgadmin4/commit/30a890337> (web)
- <https://github.com/pgadmin-org/pgadmin4> (package)
- <https://pypi.org/project/pgadmin4> (package)
- <https://github.com/advisories/GHSA-4rhg-h8f2-v4jm> (advisory)

## Sources

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

---

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