pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ZhangChi <798604270@qq.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #18936: Trigger enable users to modify the tables which hedoesn't have privilege
Date: Sat, 24 May 2025 11:06:24 +0800
Message-ID: <tencent_6FB22713DA38A8D08B25F3DDD06B9C792B07@qq.com> (raw)
In-Reply-To: <c842110a59d8c273c2edecc3510e2c3a4bca3d3c.camel@cybertec.at>
References: <18936-197af1cbbd49156f@postgresql.org>
	<c842110a59d8c273c2edecc3510e2c3a4bca3d3c.camel@cybertec.at>

Thanks for your reply!


However, it is common in some database servers for an attacker to gain minimal privileges on a single table within a target database. For instance, when registering an account on a service, the system might grant the user access to a dedicated table. Using the TRIGGER mechanism as I showed, such an attacker could then delete or exfiltrate data from other tables beyond their authorized access. Notably, this attack doesn't require superuser privileges - only access to the two relevant tables.


Permitting users to create triggers that can affect tables beyond their privilege scope appears to be a problematic design choice. Such triggers may be inadvertently executed by privileged users without their knowledge, creating potential security vulnerabilities.

view thread (4+ messages)  latest in thread

Message-ID: <tencent_6FB22713DA38A8D08B25F3DDD06B9C792B07@qq.com>
Permalink:  ../tencent_6FB22713DA38A8D08B25F3DDD06B9C792B07@qq.com/
Also on:    postgresql.org/message-id/tencent_6FB22713DA38A8D08B25F3DDD06B9C792B07@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: 798604270@qq.com, laurenz.albe@cybertec.at, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18936: Trigger enable users to modify the tables which hedoesn't have privilege
  In-Reply-To: <tencent_6FB22713DA38A8D08B25F3DDD06B9C792B07@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox