Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2018-18546

ThinkPHP 3.2.4 has SQL Injection via the order parameter because the Library/Think/Db/Driver.class.php parseOrder function mishandles the key variable.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-18546
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 08:35 UTC · Revision 1

Source evidence

CVE-2018-18546

core-osv · Original source

Published 21 Oct 2018, 01:29 UTC

ThinkPHP 3.2.4 has SQL Injection via the order parameter because the Library/Think/Db/Driver.class.php parseOrder function mishandles the key variable.

osv:CVE-2018-18546
Complete source record
{
  "id": "80f018c5da7eb6cc1f951672bcb08b9b30b3b54d5b9a60f840f8fd29301fcf5e",
  "url": "https://osv.dev/vulnerability/CVE-2018-18546",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-18546",
    "summary": "ThinkPHP 3.2.4 has SQL Injection via the order parameter because the Library/Think/Db/Driver.class.php parseOrder function mishandles the key variable.",
    "evidence": "osv:CVE-2018-18546",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2018-18546",
      "aliases": [
        "CVE-2018-18546",
        "GHSA-j7g8-3qqg-8cvm"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/top-think/thinkphp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "728c0fc21e9b438b930b916a8257a25ea9ffaf79"
                },
                {
                  "last_affected": "728c0fc21e9b438b930b916a8257a25ea9ffaf79"
                },
                {
                  "fixed": "9748cb80d2f24c89218f358ca2f5ab88ee33396f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:thinkphp:thinkphp:3.2.4:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.2.4"
                      },
                      {
                        "last_affected": "3.2.4"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9748cb80d2f24c89218f358ca2f5ab88ee33396f"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.2.4"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-18546.json"
          }
        }
      ],
      "modified": "2026-10-24T10:47:39.826739863Z",
      "provider": "osv",
      "references": [
        "https://github.com/top-think/thinkphp/commit/9748cb80d2f24c89218f358ca2f5ab88ee33396f",
        "https://98587329.github.io/2018/10/09/thinkphp%E6%B3%A8%E5%85%A5%E5%88%86%E6%9E%90/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:thinkphp:thinkphp:3.2.4:*:*:*:*:*:*:*"
            ],
            "vendor_product": "thinkphp:thinkphp",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.2.4"
                  },
                  {
                    "last_affected": "3.2.4"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2018-18546",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 441447,
  "published_at": "2018-10-21T01:29:00.433+00:00"
}