VYPR
High severityNVD Advisory· Published Feb 5, 2026· Updated Feb 26, 2026

Restore restriction bypass via key disclosure vulnerability (pgAdmin 4)

CVE-2026-1707

Description

pgAdmin versions 9.11 are affected by a Restore restriction bypass via key disclosure vulnerability that occurs when running in server mode and performing restores from PLAIN-format dump files. An attacker with access to the pgAdmin web interface can observe an active restore operation, extract the \restrict key in real time, and race the restore process by overwriting the restore script with a payload that re-enables meta-commands using \unrestrict <key>. This results in reliable command execution on the pgAdmin host during the restore operation.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
pgadmin4PyPI
< 9.129.12

Affected products

1

Patches

1
62e2d18b0261

Mask the secret key for restrict option in the process watcher when restoring plain SQL file. #9518

https://github.com/pgadmin-org/pgadmin4Akshay JoshiJan 8, 2026via ghsa
2 files changed · +9 3
  • web/pgadmin/tools/restore/__init__.py+8 3 modified
    @@ -10,7 +10,6 @@
     """Implements Restore Utility"""
     
     import json
    -import re
     import secrets
     
     from flask import render_template, request, current_app, Response
    @@ -26,7 +25,7 @@
         internal_server_error
     
     from config import PG_DEFAULT_DRIVER
    -from pgadmin.utils.constants import MIMETYPE_APP_JS, SERVER_NOT_FOUND
    +from pgadmin.utils.constants import SERVER_NOT_FOUND, RESTRICT_COMMAND
     from pgadmin.tools.user_management.PgAdminPermissions import AllPermissionTypes
     
     # set template path for sql scripts
    @@ -75,7 +74,13 @@ def cmd_arg(x):
                 return ''
     
             for arg in _args:
    -            if arg and len(arg) >= 2 and arg.startswith('--'):
    +            if arg and RESTRICT_COMMAND in arg:
    +                # Find the index where \restrict ends
    +                idx = arg.find(RESTRICT_COMMAND) + len(RESTRICT_COMMAND)
    +                # Keep the prefix and mask everything after it
    +                masked_arg = arg[:idx + 1] + "x" * (len(arg) - idx - 1)
    +                self.cmd += cmd_arg(masked_arg)
    +            elif arg and len(arg) >= 2 and arg.startswith('--'):
                     self.cmd += ' ' + arg
                 else:
                     self.cmd += cmd_arg(arg)
    
  • web/pgadmin/utils/constants.py+1 0 modified
    @@ -177,3 +177,4 @@ class MessageType:
     
     RESTRICTION_TYPE_DATABASES = 'databases'
     RESTRICTION_TYPE_SQL = 'sql'
    +RESTRICT_COMMAND = '\\restrict'
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.