{
  "affected": [
    {
      "database_specific": {
        "unresolved_ranges": [
          {
            "events": [
              {
                "introduced": "0"
              },
              {
                "last_affected": "8.0"
              }
            ]
          }
        ]
      },
      "ranges": [
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "0"
              },
              {
                "last_affected": "3.22.0"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "138d4f8de22f24317fc77c301d545c43542ae592"
            }
          ],
          "repo": "https://github.com/sqlite/sqlite",
          "type": "GIT"
        }
      ]
    }
  ],
  "details": "In SQLite through 3.22.0, databases whose schema is corrupted using a CREATE TABLE AS statement could cause a NULL pointer dereference, related to build.c and prepare.c.",
  "id": "CVE-2018-8740",
  "modified": "2026-04-01T23:09:18.918457505Z",
  "published": "2018-03-17T00:29:00.247Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2023/05/msg00022.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PU4NZ6DDU4BEM3ACM3FM6GLEPX56ZQXK/"
    },
    {
      "type": "WEB",
      "url": "https://usn.ubuntu.com/4205-1/"
    },
    {
      "type": "WEB",
      "url": "http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00050.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://usn.ubuntu.com/4394-1/"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2020/08/msg00037.html"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.sqlite.org/cgi/src/timeline?r=corrupt-schema"
    },
    {
      "type": "ADVISORY",
      "url": "http://www.securityfocus.com/bid/103466"
    },
    {
      "type": "ADVISORY",
      "url": "https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/1756349"
    },
    {
      "type": "ADVISORY",
      "url": "https://lists.debian.org/debian-lts-announce/2019/01/msg00009.html"
    },
    {
      "type": "REPORT",
      "url": "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6964"
    },
    {
      "type": "FIX",
      "url": "https://www.sqlite.org/cgi/src/vdiff?from=1774f1c3baf0bc3d\u0026to=d75e67654aa9620b"
    }
  ],
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}