这是indexloc提供的服务,不要输入任何密码
Skip to content

Register Server: an arbitrary SQL query can be fired while setting the role #6253

@khushboovashi

Description

@khushboovashi

Reproduction steps:

  1. Register the server
  2. Fill in the Host name/address, port, maintenance database, and username
  3. Enter any role that exists in the system followed by arbitrary

SQL commands, eg.

joe; RESET ROLE; CREATE TABLE pwned()

What should happen:

Error: role "joe; RESET ROLE; CREATE TABLE pwned()" does not exist

What actually happens:

Connection to the database with the login role rather than the
intended role and a new "pwned" table in the default schema.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions