Skip to content

Commit 75be0bc

Browse files
committed
Fixed a remote code execution issue in the Query Tool and Cloud Deployment (CVE-2025-2945). #8603
1 parent 1305d99 commit 75be0bc

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

docs/en_US/release_notes_9_2.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ Bug fixes
5050
| `Issue #8577 <https://github.com/pgadmin-org/pgadmin4/issues/8577>`_ - Fixed an issue where the upgrade_check API returned an unexpected keyword argument 'cafile' due to changes in the urllib package supporting Python v3.13.
5151
| `Issue #8597 <https://github.com/pgadmin-org/pgadmin4/issues/8597>`_ - Fixed an issue where delete/rename was done on wrong file after sorting in Storage Manager.
5252
| `Issue #8602 <https://github.com/pgadmin-org/pgadmin4/issues/8602>`_ - Fixed an XSS vulnerability issue in the Query Tool and View/Edit Data (CVE-2025-2946).
53+
| `Issue #8603 <https://github.com/pgadmin-org/pgadmin4/issues/8603>`_ - Fixed a remote code execution issue in the Query Tool and Cloud Deployment (CVE-2025-2945).

web/pgacloud/providers/google.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,12 @@ def _create_google_postgresql_instance(self, args):
136136
credentials = self._get_credentials(self._scopes)
137137
service = discovery.build('sqladmin', 'v1beta4',
138138
credentials=credentials)
139-
high_availability = \
140-
'REGIONAL' if eval(args.high_availability) else 'ZONAL'
139+
140+
_high_availability = args.high_availability.lower() in (
141+
'true', '1') if isinstance(args.high_availability, str
142+
) else args.high_availability
143+
144+
high_availability = 'REGIONAL' if _high_availability else 'ZONAL'
141145

142146
db_password = self._database_password \
143147
if self._database_password is not None else args.db_password

web/pgadmin/tools/sqleditor/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,8 @@ def start_query_download_tool(trans_id):
21562156
sql = value
21572157
if key == 'query_commited':
21582158
query_commited = (
2159-
eval(value) if isinstance(value, str) else value
2159+
value.lower() in ('true', '1') if isinstance(
2160+
value, str) else value
21602161
)
21612162
if not sql:
21622163
sql = trans_obj.get_sql(sync_conn)

0 commit comments

Comments
 (0)