pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15731: CVE-2019-9193
4+ messages / 3 participants
[nested] [flat]

* BUG #15731: CVE-2019-9193
@ 2019-04-03 07:38  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Bug reporting form @ 2019-04-03 07:38 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: abhijit_rajwade@bmc.com

The following bug has been logged on the website:

Bug reference:      15731
Logged by:          Abhijit Rajwade
Email address:      abhijit_rajwade@bmc.com
PostgreSQL version: 11.2
Operating system:   Linux
Description:        

Sonatype Nexus Audior is reporting the following Threat level 9
vulnerability on Postgres

Vulnerability

Issue CVE-2019-9193 
Severity Sonatype CVSS 3.0: 9.8 
Weakness Sonatype CWE: 94 
Source National Vulnerability Database 
Categories Data 

Description

Description from CVE
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows
superusers and users in the 'pg_read_server_files' group to execute
arbitrary code in the context of the database's operating system user. This
functionality is enabled by default and can be abused to run arbitrary
operating system commands on Windows, Linux, and macOS. 

Root Cause
postgresql-42.2.5.jar : [9.3, ) 

Advisories
    Third Party:
https://github.com/iiiusky/vulhub/commit/88c8816c6f8825030ade34c63c745757ca818fc0#diff-ceb08c22f5e39...
    Third Party:
https://medium.com/greenwolf-security/authenticated-arbitrary-command-execution-on-postgresql-9-3-la...

CVSS Details
    Sonatype CVSS 3.0: 9.8
    CVSS Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 


Can you please have the above Security vulnerability fixed?

--- Abhijit Rajwade



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #15731: CVE-2019-9193
@ 2019-04-03 07:42  Magnus Hagander <magnus@hagander.net>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Magnus Hagander @ 2019-04-03 07:42 UTC (permalink / raw)
  To: abhijit_rajwade@bmc.com; pgsql-bugs@lists.postgresql.org

This is not a security vulnerability in the product. It is behaving exactly
as intended. It may be misconfigured in some deployments, but it's not a
product vulnerability.

/Magnus


On Wed, Apr 3, 2019, 09:39 PG Bug reporting form <noreply@postgresql.org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference:      15731
> Logged by:          Abhijit Rajwade
> Email address:      abhijit_rajwade@bmc.com
> PostgreSQL version: 11.2
> Operating system:   Linux
> Description:
>
> Sonatype Nexus Audior is reporting the following Threat level 9
> vulnerability on Postgres
>
> Vulnerability
>
> Issue CVE-2019-9193
> Severity Sonatype CVSS 3.0: 9.8
> Weakness Sonatype CWE: 94
> Source National Vulnerability Database
> Categories Data
>
> Description
>
> Description from CVE
> In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows
> superusers and users in the 'pg_read_server_files' group to execute
> arbitrary code in the context of the database's operating system user. This
> functionality is enabled by default and can be abused to run arbitrary
> operating system commands on Windows, Linux, and macOS.
>
> Root Cause
> postgresql-42.2.5.jar : [9.3, )
>
> Advisories
>     Third Party:
>
> https://github.com/iiiusky/vulhub/commit/88c8816c6f8825030ade34c63c745757ca818fc0#diff-ceb08c22f5e39...
>     Third Party:
>
> https://medium.com/greenwolf-security/authenticated-arbitrary-command-execution-on-postgresql-9-3-la...
>
> CVSS Details
>     Sonatype CVSS 3.0: 9.8
>     CVSS Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
>
>
> Can you please have the above Security vulnerability fixed?
>
> --- Abhijit Rajwade
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* RE:  Re: BUG #15731: CVE-2019-9193
@ 2019-04-03 07:46  Rajwade, Abhijit <Abhijit_Rajwade@bmc.com>
  parent: Magnus Hagander <magnus@hagander.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Rajwade, Abhijit @ 2019-04-03 07:46 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>; +Cc: Phadtare, Yogesh <yogesh_phadtare@bmc.com>; Sanklecha, Akshay <akshay_sanklecha_tp@bmc.com>; Nambiar, Girish <Girish_Nambiar@bmc.com>

Magnus,

If this is mis-configured, can you please advise what configuration is needed to prevent this vulnerability?

Thx & Regards
--- Abhijit Rajwade

From: Magnus Hagander [mailto:magnus@hagander.net]
Sent: Wednesday, April 03, 2019 1:13 PM
To: Rajwade, Abhijit; pgsql-bugs@lists.postgresql.org
Subject: [EXTERNAL] Re: BUG #15731: CVE-2019-9193

This is not a security vulnerability in the product. It is behaving exactly as intended. It may be misconfigured in some deployments, but it's not a product vulnerability.

/Magnus

On Wed, Apr 3, 2019, 09:39 PG Bug reporting form <noreply@postgresql.org<mailto:noreply@postgresql.org>> wrote:
The following bug has been logged on the website:

Bug reference:      15731
Logged by:          Abhijit Rajwade
Email address:      abhijit_rajwade@bmc.com<mailto:abhijit_rajwade@bmc.com>
PostgreSQL version: 11.2
Operating system:   Linux
Description:

Sonatype Nexus Audior is reporting the following Threat level 9
vulnerability on Postgres

Vulnerability

Issue CVE-2019-9193
Severity Sonatype CVSS 3.0: 9.8
Weakness Sonatype CWE: 94
Source National Vulnerability Database
Categories Data

Description

Description from CVE
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows
superusers and users in the 'pg_read_server_files' group to execute
arbitrary code in the context of the database's operating system user. This
functionality is enabled by default and can be abused to run arbitrary
operating system commands on Windows, Linux, and macOS.

Root Cause
postgresql-42.2.5.jar : [9.3, )

Advisories
    Third Party:
https://github.com/iiiusky/vulhub/commit/88c8816c6f8825030ade34c63c745757ca818fc0#diff-ceb08c22f5e39...;
    Third Party:
https://medium.com/greenwolf-security/authenticated-arbitrary-command-execution-on-postgresql-9-3-la...;

CVSS Details
    Sonatype CVSS 3.0: 9.8
    CVSS Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H


Can you please have the above Security vulnerability fixed?

--- Abhijit Rajwade


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Re: BUG #15731: CVE-2019-9193
@ 2019-04-03 08:10  Magnus Hagander <magnus@hagander.net>
  parent: Rajwade, Abhijit <Abhijit_Rajwade@bmc.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Magnus Hagander @ 2019-04-03 08:10 UTC (permalink / raw)
  To: Rajwade, Abhijit <Abhijit_Rajwade@bmc.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>; Phadtare, Yogesh <yogesh_phadtare@bmc.com>; Sanklecha, Akshay <akshay_sanklecha_tp@bmc.com>; Nambiar, Girish <Girish_Nambiar@bmc.com>

It's absolutely trivial. Don't run as superuser, done.

Again, there is no vulnerability to prevent from. If you explicitly allow
superusers to log in remotely, they can do superuser things. Just like if
you allow "root" to ssh in remotely, people can use that to ssh in as
"root" and do root level things like delete your files.

(The report is of course also simply factually incorrect, because the
pg_read_server_files role has exactly nothing to do with it. Which is also
clearly documented. And you can even tell from the name that it's about
reading files)

You can read some more at
https://blog.hagander.net/when-a-vulnerability-is-not-a-vulnerability-244/
-- which also quotes some relevant parts of the documentation.

//Magnus

On Wed, Apr 3, 2019 at 9:47 AM Rajwade, Abhijit <Abhijit_Rajwade@bmc.com>
wrote:

> Magnus,
>
>
>
> If this is mis-configured, can you please advise what configuration is
> needed to prevent this vulnerability?
>
>
>
> Thx & Regards
>
> --- Abhijit Rajwade
>
>
>
> *From:* Magnus Hagander [mailto:magnus@hagander.net]
> *Sent:* Wednesday, April 03, 2019 1:13 PM
> *To:* Rajwade, Abhijit; pgsql-bugs@lists.postgresql.org
> *Subject:* [EXTERNAL] Re: BUG #15731: CVE-2019-9193
>
>
>
> This is not a security vulnerability in the product. It is behaving
> exactly as intended. It may be misconfigured in some deployments, but it's
> not a product vulnerability.
>
>
>
> /Magnus
>
>
>
> On Wed, Apr 3, 2019, 09:39 PG Bug reporting form <noreply@postgresql.org>
> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference:      15731
> Logged by:          Abhijit Rajwade
> Email address:      abhijit_rajwade@bmc.com
> PostgreSQL version: 11.2
> Operating system:   Linux
> Description:
>
> Sonatype Nexus Audior is reporting the following Threat level 9
> vulnerability on Postgres
>
> Vulnerability
>
> Issue CVE-2019-9193
> Severity Sonatype CVSS 3.0: 9.8
> Weakness Sonatype CWE: 94
> Source National Vulnerability Database
> Categories Data
>
> Description
>
> Description from CVE
> In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows
> superusers and users in the 'pg_read_server_files' group to execute
> arbitrary code in the context of the database's operating system user. This
> functionality is enabled by default and can be abused to run arbitrary
> operating system commands on Windows, Linux, and macOS.
>
> Root Cause
> postgresql-42.2.5.jar : [9.3, )
>
> Advisories
>     Third Party:
>
> https://github.com/iiiusky/vulhub/commit/88c8816c6f8825030ade34c63c745757ca818fc0#diff-ceb08c22f5e39...
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_iiiusky_vulhub_commit_88c8816c6f8825...;
>     Third Party:
>
> https://medium.com/greenwolf-security/authenticated-arbitrary-command-execution-on-postgresql-9-3-la...
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__medium.com_greenwolf-2Dsecurity_authenticated-2...;
>
> CVSS Details
>     Sonatype CVSS 3.0: 9.8
>     CVSS Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
>
>
> Can you please have the above Security vulnerability fixed?
>
> --- Abhijit Rajwade
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-04-03 08:10 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 07:38 BUG #15731: CVE-2019-9193 PG Bug reporting form <noreply@postgresql.org>
2019-04-03 07:42 ` Magnus Hagander <magnus@hagander.net>
2019-04-03 07:46   ` Rajwade, Abhijit <Abhijit_Rajwade@bmc.com>
2019-04-03 08:10     ` Magnus Hagander <magnus@hagander.net>

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