Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-95837

SQLi (SQL Injection) org.postgresql:postgresql Dependency in Confluence Data Center and Server

    • 9.8
    • Critical
    • CVE-2024-1597
    • Atlassian (Internal)
    • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    • SQLi (SQL Injection)
    • Confluence Data Center, Confluence Server

      This Critical severity org.postgresql:postgresql Dependency vulnerability was introduced in versions 6.0.1 of Confluence Data Center and Server. Confluence Data Center is unaffected by this vulnerability as it does not use the PreferQueryMode=SIMPLE parameter required for this vulnerability in it's SQL database connection settings. Whilst the default configuration is safe, the vulnerability remains in the driver that ships with Confluence.

      This org.postgresql:postgresql Dependency vulnerability, with a CVSS Score of 9.8 and a CVSS Vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H allows an unauthenticated attacker to expose assets in your environment susceptible to exploitation which has high impact to confidentiality, high impact to integrity, high impact to availability, and requires no user interaction.

      Data Center

      Atlassian recommends that Confluence Data Center customers upgrade to the latest version. If you are unable to do so, upgrade your instance to one of the specified supported fixed versions:

      Affected versions Fixed versions
      8.9.0 8.9.1
      from 8.8.0 to 8.8.1 8.9.1
      from 8.7.0 to 8.7.2 8.9.1
      from 8.6.0 to 8.6.2 8.9.1
      from 8.5.0 to 8.5.7 LTS 8.9.1 or 8.5.9 LTS recommended
      from 8.4.0 to 8.4.5 8.9.1 or 8.5.9 LTS recommended
      from 8.3.0 to 8.3.4 8.9.1 or 8.5.9 LTS recommended
      from 8.2.0 to 8.2.3 8.9.1 or 8.5.9 LTS recommended
      from 8.1.0 to 8.1.4 8.9.1 or 8.5.9 LTS recommended
      from 8.0.0 to 8.0.4 8.9.1 or 8.5.9 LTS recommended
      from 7.20.0 to 7.20.3 8.9.1 or 8.5.9 LTS recommended
      from 7.19.0 to 7.19.21 LTS 8.9.1 or 8.5.9 LTS recommended or 7.19.22 LTS
      from 7.18.0 to 7.18.3 8.9.1 or 8.5.9 LTS recommended or 7.19.22 LTS
      from 7.17.0 to 7.17.5 8.9.1 or 8.5.9 LTS recommended or 7.19.22 LTS
      Any earlier versions 8.9.1 or 8.5.9 LTS recommended or 7.19.22 LTS

       

      Server

      Atlassian recommends that Confluence Server customers upgrade to the latest version. If you are unable to do so, upgrade your instance to one of the specified supported fixed versions:

      Affected versions Fixed versions
      from 8.5.0 to 8.5.8 LTS 8.5.9 LTS recommended
      from 8.4.0 to 8.4.5 8.5.9 LTS recommended
      from 8.3.0 to 8.3.4 8.5.9 LTS recommended
      from 8.2.0 to 8.2.3 8.5.9 LTS recommended
      from 8.1.0 to 8.1.4 8.5.9 LTS recommended
      from 8.0.0 to 8.0.4 8.5.9 LTS recommended
      from 7.20.0 to 7.20.3 8.5.9 LTS recommended
      from 7.19.0 to 7.19.21 LTS 8.5.9 LTS recommended or 7.19.22 LTS
      from 7.18.0 to 7.18.3 8.5.9 LTS recommended or 7.19.22 LTS
      from 7.17.0 to 7.17.5 8.5.9 LTS recommended or 7.19.22 LTS
      Any earlier versions 8.5.9 LTS recommended or 7.19.22 LTS

       

      See the release notes (https://confluence.atlassian.com/doc/confluence-release-notes-327.html). You can download the latest version of Confluence Data Center and Server from the download center (https://www.atlassian.com/software/confluence/download-archives).

      The National Vulnerability Database provides the following description for this vulnerability: pgjdbc, the PostgreSQL JDBC Driver, allows attacker to inject SQL if using PreferQueryMode=SIMPLE. Note this is not the default. In the default mode there is no vulnerability. A placeholder for a numeric value must be immediately preceded by a minus. There must be a second placeholder for a string value after the first placeholder; both must be on the same line. By constructing a matching string payload, the attacker can inject SQL to alter the query,bypassing the protections that parameterized queries bring against SQL Injection attacks. Versions before 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, and 42.2.28 are affected.

            [CONFSERVER-95837] SQLi (SQL Injection) org.postgresql:postgresql Dependency in Confluence Data Center and Server

            It seems the "Fix Version/s:" in the issue metadata has a wrong version 7.19.21 attached which should be 7.19.22 instead (if the tables in the issue description is correct).

            Green Bone added a comment - It seems the "Fix Version/s:" in the issue metadata has a wrong version 7.19.21 attached which should be 7.19.22 instead (if the tables in the issue description is correct).

            Jeremy R added a comment -

            73fb1717514e You are correct that Confluence 8.5.8 does solve for this critical CVE.  However, there were additional high-severity CVEs listed in our May security bulletin that were fixed in the latest version, 8.5.9 LTS.  I'd recommend you review the bulletin to determine if an upgrade to 8.5.9 is best for your organization.

            Jeremy R added a comment - 73fb1717514e You are correct that Confluence 8.5.8 does solve for this critical CVE.  However, there were additional high-severity CVEs listed in our May security bulletin that were fixed in the latest version, 8.5.9 LTS.  I'd recommend you review the bulletin to determine if an upgrade to 8.5.9 is best for your organization.

            @James Ponting - We are currently in Data center with Version 8.5.8, I can see Version 8.5.8 is listed in fix versions, so we don't need to upgrade to version 8.5.9 LTS ?

            Ramakrishna Anumalla added a comment - @James Ponting - We are currently in Data center with Version 8.5.8, I can see Version 8.5.8 is listed in fix versions, so we don't need to upgrade to version 8.5.9 LTS ?

            Jeremy R added a comment -

            4e08f691c38d Thank you for the note - I've corrected the versions to show 8.5.8 is indeed fixed.

            Jeremy R added a comment - 4e08f691c38d Thank you for the note - I've corrected the versions to show 8.5.8 is indeed fixed.

            "Fix version" is 8.5.8 but in the table below 8.5.8 is an affected version and 8.5.9 is the fix version?

            Jörn Donneau added a comment - "Fix version" is 8.5.8 but in the table below 8.5.8 is an affected version and 8.5.9 is the fix version?

            Jeremy R added a comment -

            2bb61b4fd867—You are correct. The parameter is not used in Confluence by default. However, the Postgres driver shipped with the affected versions is still vulnerable to SQL injection. Upgrading to a fixed version when your team is ready will update the Postgres driver to a fixed version.

            Jeremy R added a comment - 2bb61b4fd867 —You are correct. The parameter is not used in Confluence by default. However, the Postgres driver shipped with the affected versions is still vulnerable to SQL injection. Upgrading to a fixed version when your team is ready will update the Postgres driver to a fixed version.

            So what you are saying is, if the variable isn't set, there is no urgency to upgrade?

            Kris Melis added a comment - So what you are saying is, if the variable isn't set, there is no urgency to upgrade?

            James, does that also apply to JSWSERVER-25896 ?

            Tommy van Extel added a comment - James, does that also apply to  JSWSERVER-25896 ?

            Hi All,

            I've made a change to the opening line of the advisory to try and differentiate and explain this situation here.

            For additional clarity, Confluence 6.0.1 shipped with a Postgres driver that was vulnerable to this SQL injection vulnerability. In order to be vulnerable, the PreferQueryMode=SIMPLE parameter needs to be set. Out of the box, Confluence DOES NOT use this parameter. As a result, Confluence IS NOT vulnerable by default.

            Atlassian recommends upgrading to the latest version of Confluence as it includes a Postgres driver that is no longer vulnerable regardless of whether PreferQueryMode=SIMPLE is set or not.

            Our apologies that the wording of the initial advisory was confusing. In attempting to strike a balance of fully informing you all, and avoiding an unnecessary panic, we missed the mark.

            Hopefully the above helps provide clarity as to this issue.

            Thanks,
            James Ponting
            Engineering Manager - Confluence Data Center

            James Ponting added a comment - Hi All, I've made a change to the opening line of the advisory to try and differentiate and explain this situation here. For additional clarity, Confluence 6.0.1 shipped with a Postgres driver that was vulnerable to this SQL injection vulnerability. In order to be vulnerable, the PreferQueryMode=SIMPLE parameter needs to be set. Out of the box, Confluence DOES NOT use this parameter. As a result, Confluence IS NOT vulnerable by default. Atlassian recommends upgrading to the latest version of Confluence as it includes a Postgres driver that is no longer vulnerable regardless of whether PreferQueryMode=SIMPLE is set or not. Our apologies that the wording of the initial advisory was confusing. In attempting to strike a balance of fully informing you all, and avoiding an unnecessary panic, we missed the mark. Hopefully the above helps provide clarity as to this issue. Thanks, James Ponting Engineering Manager - Confluence Data Center

            Hi All,

            Quick note, I've seen the comments here and am engaging with our security team so I can make some changes here.

            I believe I understand the issue, but want to clarify to ensure I don't add to the confusion.

            Please bear with me, I'll get back to you as soon as I have an answer.

            Thanks,
            James Ponting
            Engineering Manager - Confluence Data Center

            James Ponting added a comment - Hi All, Quick note, I've seen the comments here and am engaging with our security team so I can make some changes here. I believe I understand the issue, but want to clarify to ensure I don't add to the confusion. Please bear with me, I'll get back to you as soon as I have an answer. Thanks, James Ponting Engineering Manager - Confluence Data Center

              Unassigned Unassigned
              security-metrics-bot Security Metrics Bot
              Votes:
              0 Vote for this issue
              Watchers:
              19 Start watching this issue

                Created:
                Updated:
                Resolved: