ID CVE-2017-15099
Summary INSERT ... ON CONFLICT DO UPDATE commands in PostgreSQL 10.x before 10.1, 9.6.x before 9.6.6, and 9.5.x before 9.5.10 disclose table contents that the invoker lacks privilege to read. These exploits affect only tables where the attacker lacks full read access but has both INSERT and UPDATE privileges. Exploits bypass row level security policies and lack of SELECT privilege.
References
Vulnerable Configurations
  • PostgreSQL PostgreSQL 9.5
    cpe:2.3:a:postgresql:postgresql:9.5
  • PostgreSQL 9.5.1
    cpe:2.3:a:postgresql:postgresql:9.5.1
  • PostgreSQL 9.5.2
    cpe:2.3:a:postgresql:postgresql:9.5.2
  • PostgreSQL 9.5.3
    cpe:2.3:a:postgresql:postgresql:9.5.3
  • PostgreSQL 9.5.4
    cpe:2.3:a:postgresql:postgresql:9.5.4
  • PostgreSQL 9.5.5
    cpe:2.3:a:postgresql:postgresql:9.5.5
  • PostgreSQL 9.5.6
    cpe:2.3:a:postgresql:postgresql:9.5.6
  • PostgreSQL 9.5.7
    cpe:2.3:a:postgresql:postgresql:9.5.7
  • PostgreSQL 9.5.8
    cpe:2.3:a:postgresql:postgresql:9.5.8
  • PostgreSQL 9.5.9
    cpe:2.3:a:postgresql:postgresql:9.5.9
  • PostgreSQL 9.6
    cpe:2.3:a:postgresql:postgresql:9.6
  • PostgreSQL 9.6.1
    cpe:2.3:a:postgresql:postgresql:9.6.1
  • PostgreSQL 9.6.2
    cpe:2.3:a:postgresql:postgresql:9.6.2
  • PostgreSQL 9.6.3
    cpe:2.3:a:postgresql:postgresql:9.6.3
  • PostgreSQL 9.6.4
    cpe:2.3:a:postgresql:postgresql:9.6.4
  • PostgreSQL 9.6.5
    cpe:2.3:a:postgresql:postgresql:9.6.5
  • PostgreSQL 10.0
    cpe:2.3:a:postgresql:postgresql:10.0
  • Debian Linux 9.0
    cpe:2.3:o:debian:debian_linux:9.0
CVSS
Base: 4.0
Impact:
Exploitability:
CWE CWE-200
CAPEC
  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.
  • Reusing Session IDs (aka Session Replay)
    This attack targets the reuse of valid session ID to spoof the target system in order to gain privileges. The attacker tries to reuse a stolen session ID used previously during a transaction to perform spoofing and session hijacking. Another name for this type of attack is Session Replay.
  • Using Slashes in Alternate Encoding
    This attack targets the encoding of the Slash characters. An attacker would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the attacker many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.
nessus via4
  • NASL family Databases
    NASL id POSTGRESQL_20171109.NASL
    description The version of PostgreSQL installed on the remote host is 9.2.x prior to 9.2.24, 9.3.x prior to 9.3.20, 9.4.x prior to 9.4.15, 9.5.x prior to 9.5.10, 9.6.x prior to 9.6.6, or 10.x prior to 10.1. It is, therefore, affected by multiple vulnerabilities including a denial of service attack.
    last seen 2019-02-21
    modified 2018-12-14
    plugin id 104574
    published 2017-11-15
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=104574
    title PostgreSQL 9.2.x < 9.2.24 / 9.3.x < 9.3.20 / 9.4.x < 9.4.15 / 9.5.x < 9.5.10 / 9.6.x < 9.6.6 / 10.x < 10.1 Multiple Vulnerabilities
  • NASL family Amazon Linux Local Security Checks
    NASL id ALA_ALAS-2017-930.NASL
    description Privilege escalation flaws were found in the initialization scripts of PostgreSQL. A remote attacker with access to the postgres user account could use these flaws to obtain root access on the server machine.(CVE-2017-12172) INSERT ... ON CONFLICT DO UPDATE commands in PostgreSQL disclose table contents that the invoker lacks privilege to read. These exploits affect only tables where the attacker lacks full read access but has both INSERT and UPDATE privileges. Exploits bypass row level security policies and lack of SELECT privilege.(CVE-2017-15099) Invalid json_populate_recordset or jsonb_populate_recordset function calls in PostgreSQL can crash the server or disclose a few bytes of server memory.(CVE-2017-15098)
    last seen 2019-02-21
    modified 2018-04-18
    plugin id 105054
    published 2017-12-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=105054
    title Amazon Linux AMI : postgresql95 / postgresql96 (ALAS-2017-930)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2017-3391-1.NASL
    description This update for postgresql96 fixes the following issues: Security issues fixed : - CVE-2017-15098: Fix crash due to rowtype mismatch in json{b}_populate_recordset() (bsc#1067844). - CVE-2017-15099: Ensure that INSERT ... ON CONFLICT DO UPDATE checks table permissions and RLS policies in all cases (bsc#1067841). Bug fixes : - Update to version 9.6.6 : - https://www.postgresql.org/docs/9.6/static/release-9-6-6.html - https://www.postgresql.org/docs/9.6/static/release-9-6-5.html Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 105458
    published 2017-12-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=105458
    title SUSE SLED12 / SLES12 Security Update : postgresql96 (SUSE-SU-2017:3391-1)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-3479-1.NASL
    description David Rowley discovered that PostgreSQL incorrectly handled memory when processing certain JSON functions. A remote attacker could possibly use this issue to obtain sensitive information. (CVE-2017-15098) Dean Rasheed discovered that PostgreSQL incorrectly enforced SELECT privileges when processing INSERT ... ON CONFLICT DO UPDATE commands. A remote attacker could possibly use this issue to obtain sensitive information. This issue only affected Ubuntu 16.04 LTS, Ubuntu 17.04 and Ubuntu 17.10. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 104569
    published 2017-11-15
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=104569
    title Ubuntu 14.04 LTS / 16.04 LTS / 17.04 / 17.10 : postgresql-9.3, postgresql-9.5, postgresql-9.6 vulnerabilities (USN-3479-1)
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_1F02AF5DC56611E7A12D6CC21735F730.NASL
    description The PostgreSQL project reports : - CVE-2017-15098: Memory disclosure in JSON functions - CVE-2017-15099: INSERT ... ON CONFLICT DO UPDATE fails to enforce SELECT privileges
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 104489
    published 2017-11-10
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=104489
    title FreeBSD : PostgreSQL vulnerabilities (1f02af5d-c566-11e7-a12d-6cc21735f730)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-4028.NASL
    description Several vulnerabilities have been found in the PostgreSQL database system : - CVE-2017-15098 Denial of service and potential memory disclosure in the json_populate_recordset() and jsonb_populate_recordset() functions - CVE-2017-15099 Insufficient permissions checks in 'INSERT ... ON CONFLICT DO UPDATE' statements.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 104484
    published 2017-11-10
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=104484
    title Debian DSA-4028-1 : postgresql-9.6 - security update
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2017-1411.NASL
    description This update for postgresql96 fixes the following issues : Security issues fixed : - CVE-2017-15098: Fix crash due to rowtype mismatch in json{b}_populate_recordset() (bsc#1067844). - CVE-2017-15099: Ensure that INSERT ... ON CONFLICT DO UPDATE checks table permissions and RLS policies in all cases (bsc#1067841). Bug fixes : - Update to version 9.6.6 : - https://www.postgresql.org/docs/9.6/static/release-9-6-6.html - https://www.postgresql.org/docs/9.6/static/release-9-6-5.html This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 105454
    published 2017-12-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=105454
    title openSUSE Security Update : postgresql96 (openSUSE-2017-1411)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-204.NASL
    description This update for postgresql95 fixes the following issues : Upate to PostgreSQL 9.5.11 : Security issues fixed : - https://www.postgresql.org/docs/9.5/static/release-9-5-11.html - CVE-2018-1053, boo#1077983: Ensure that all temporary files made by pg_upgrade are non-world-readable. - boo#1079757: Rename pg_rewind's copy_file_range function to avoid conflict with new Linux system call of that name. In version 9.5.10 : - https://www.postgresql.org/docs/9.5/static/release-9-5-10.html - CVE-2017-15098, boo#1067844: Memory disclosure in JSON functions. - CVE-2017-15099, boo#1067841: INSERT ... ON CONFLICT DO UPDATE fails to enforce SELECT privileges. In version 9.5.9 : - https://www.postgresql.org/docs/9.5/static/release-9-5-9.html - Show foreign tables in information_schema.table_privileges view. - Clean up handling of a fatal exit (e.g., due to receipt of SIGTERM) that occurs while trying to execute a ROLLBACK of a failed transaction. - Remove assertion that could trigger during a fatal exit. - Correctly identify columns that are of a range type or domain type over a composite type or domain type being searched for. - Fix crash in pg_restore when using parallel mode and using a list file to select a subset of items to restore. - Change ecpg's parser to allow RETURNING clauses without attached C variables. In version 9.5.8 - https://www.postgresql.org/docs/9.5/static/release-9-5-8.html - CVE-2017-7547, boo#1051685: Further restrict visibility of pg_user_mappings.umoptions, to protect passwords stored as user mapping options. - CVE-2017-7546, boo#1051684: Disallow empty passwords in all password-based authentication methods. - CVE-2017-7548, boo#1053259: lo_put() function ignores ACLs.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 106965
    published 2018-02-23
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106965
    title openSUSE Security Update : postgresql95 (openSUSE-2018-204)
  • NASL family PhotonOS Local Security Checks
    NASL id PHOTONOS_PHSA-2017-0048.NASL
    description An update of [curl,glibc,postgresql] packages of photonOS has been released.
    last seen 2019-02-21
    modified 2019-02-07
    plugin id 111897
    published 2018-08-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=111897
    title Photon OS 1.0: Curl / Glibc PHSA-2017-0048 (deprecated)
redhat via4
advisories
  • rhsa
    id RHSA-2018:2511
  • rhsa
    id RHSA-2018:2566
refmap via4
bid 101781
confirm https://www.postgresql.org/about/news/1801/
debian DSA-4028
misc https://www.postgresql.org/support/security/
sectrack 1039752
Last major update 22-11-2017 - 13:29
Published 22-11-2017 - 13:29
Last modified 28-08-2018 - 06:29
Back to Top