Every CVE Search/ Get API key

CVE-2018-8740

In SQLite through 3.22.0, databases whose schema is corrupted using a CREATE TABLE AS statement...

7.5 HighFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

7.97%Up 5.5 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

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.

Record
CVE-2018-8740
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-476
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2018-8740
Updated
2026-11-02
EUVDEUVD-2018-20350 No score

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.

Record
EUVD-2018-20350
Updated
2026-11-03
GitHub AdvisoriesGHSA-c753-vqf3-vjxh 7.5

In SQLite through 3.22.0, databases whose schema is corrupted using a CREATE TABLE AS statement...

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.

Record
GHSA-c753-vqf3-vjxh
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-476
Updated
2026-11-02
OSVALPINE-CVE-2018-8740 7.5

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.

Record
ALPINE-CVE-2018-8740
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVBELL-CVE-2018-8740 7.5

CVE-2018-8740 does not affect BellSoft software

Record
BELL-CVE-2018-8740
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 13 moreShow less
OSV 7.5

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.

Record
CVE-2018-8740
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2018-8740 7.5

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.

Record
DEBIAN-CVE-2018-8740
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2018-8740 7.5

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.

Record
UBUNTU-CVE-2018-8740
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVCLSA-2026-1777052042 No score

sqlite: Fix of CVE-2018-8740

  • CVE-2018-8740: avoid a NULL pointer dereference when the sqlite_master schema contains a corrupt CREATE TABLE AS entry
Record
CLSA-2026-1777052042
Updated
2026-11-02
OSVCLSA-2026-1777106754 No score

sqlite: Fix of CVE-2018-8740

  • CVE-2018-8740: avoid a NULL pointer dereference when the sqlite_master schema contains a corrupt CREATE TABLE AS entry
Record
CLSA-2026-1777106754
Updated
2026-11-02
OSVMGASA-2018-0181 No score

Updated sqlite3 packages fix security vulnerability

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 (CVE-2018-8740).

Record
MGASA-2018-0181
Updated
2026-11-02
OSVMGASA-2023-0208 No score

Updated sqlite packages fix security vulnerability

os_unix.c in SQLite before 3.13.0 improperly implements the temporary directory search algorithm, which might allow local users to obtain sensitive information, cause a denial of service (application crash), or have unspecified other impact by leveraging use of the current working directory for temporary files. (CVE-2016-6153) 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 (CVE-2018-8740)

Record
MGASA-2023-0208
Updated
2026-11-02
OSVopenSUSE-SU-2024:11400-1 No score

libsqlite3-0-3.36.0-1.2 on GA media

These are all security issues fixed in the libsqlite3-0-3.36.0-1.2 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11400-1
Updated
2026-11-02
OSVSUSE-SU-2019:1208-1 No score

Security update for sqlite3

This update for sqlite3 fixes the following issues:

Security issue fixed:

  • CVE-2018-8740: Fixed a NULL pointer dereference related to corrupted databases schemas (bsc#1085790).
  • CVE-2017-10989: Fixed a heap-based buffer over-read in getNodeSize() (bsc#1132045).
Record
SUSE-SU-2019:1208-1
Updated
2026-11-02
OSVSUSE-SU-2019:1522-1 No score

Security update for sqlite3

This update for sqlite3 fixes the following issues:

Security issue fixed:

  • CVE-2019-8457: Fixed a Heap out-of-bound read in rtreenode() when handling invalid rtree tables (bsc#1136976).
  • CVE-2018-8740: Fixed a NULL pointer dereference related to corrupted databases schemas (bsc#1085790).
  • CVE-2017-10989: Fixed a heap-based buffer over-read in getNodeSize() (bsc#1132045).
Record
SUSE-SU-2019:1522-1
Updated
2026-11-02
OSVSUSE-SU-2021:3215-1 No score

Security update for sqlite3

This update for sqlite3 fixes the following issues:

sqlite3 is sync version 3.36.0 from Factory (jsc#SLE-16032).

The following CVEs have been fixed in upstream releases up to this point, but were not mentioned in the change log so far:

  • bsc#1173641, CVE-2020-15358: heap-based buffer overflow in multiSelectOrderBy due to mishandling of query-flattener optimization
  • bsc#1164719, CVE-2020-9327: NULL pointer dereference and segmentation fault because of generated column optimizations in isAuxiliaryVtabOperator
  • bsc#1160439, CVE-2019-20218: selectExpander in select.c proceeds with WITH stack unwinding even after a parsing error
  • bsc#1160438, CVE-2019-19959: memory-management error via ext/misc/zipfile.c involving embedded '\0' input
  • bsc#1160309, CVE-2019-19923: improper handling of certain uses of SELECT DISTINCT in flattenSubquery may lead to null pointer dereference
  • bsc#1159850, CVE-2019-19924: improper error handling in sqlite3WindowRewrite()
  • bsc#1159847, CVE-2019-19925: improper handling of NULL pathname during an update of a ZIP archive
  • bsc#1159715, CVE-2019-19926: improper handling of certain errors during parsing multiSelect in select.c
  • bsc#1159491, CVE-2019-19880: exprListAppendList in window.c allows attackers to trigger an invalid pointer dereference
  • bsc#1158960, CVE-2019-19603: during handling of CREATE TABLE and CREATE VIEW statements, does not consider confusion with a shadow table name
  • bsc#1158959, CVE-2019-19646: pragma.c mishandles NOT NULL in an integrity_check PRAGMA command in certain cases of generated columns
  • bsc#1158958, CVE-2019-19645: alter.c allows attackers to trigger infinite recursion via certain types of self-referential views in conjunction with ALTER TABLE statements
  • bsc#1158812, CVE-2019-19317: lookupName in resolve.c omits bits from the colUsed bitmask in the case of a generated column, which allows attackers to cause a denial of service
  • bsc#1157818, CVE-2019-19244: sqlite3,sqlite2,sqlite: The function sqlite3Select in select.c allows a crash if a sub-select uses both DISTINCT and window functions, and also has certain ORDER BY usage
  • bsc#928701, CVE-2015-3415: sqlite3VdbeExec comparison operator vulnerability
  • bsc#928700, CVE-2015-3414: sqlite3,sqlite2: dequoting of collation-sequence names
  • CVE-2020-13434 bsc#1172115: integer overflow in sqlite3_str_vappendf
  • CVE-2020-13630 bsc#1172234: use-after-free in fts3EvalNextRow
  • CVE-2020-13631 bsc#1172236: virtual table allowed to be renamed to one of its shadow tables
  • CVE-2020-13632 bsc#1172240: NULL pointer dereference via crafted matchinfo() query
  • CVE-2020-13435: Malicious SQL statements could have crashed the process that is running SQLite (bsc#1172091)
Record
SUSE-SU-2021:3215-1
Updated
2026-11-02
OSVUSN-4205-1 No score

sqlite3 vulnerabilities

It was discovered that SQLite incorrectly handled certain schemas. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 12.04 ESM. (CVE-2018-8740)

It was discovered that SQLite incorrectly handled certain schemas. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04 LTS and Ubuntu 19.04. (CVE-2019-16168)

It was discovered that SQLite incorrectly handled certain schemas. An attacker could possibly use this issue to mishandles some expressions. This issue only affected Ubuntu 19.04 and Ubuntu 19.10. (CVE-2019-19242)

It was discovered that SQLite incorrectly handled certain queries. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 19.04 and Ubuntu 19.10. (CVE-2019-19244)

It was discovered that SQLite incorrectly handled certain SQL commands. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 19.04. (CVE-2019-5018)

It was discovered that SQLite incorrectly handled certain commands. An attacker could possibly use this issue to execute arbitrary code. (CVE-2019-5827)

Record
USN-4205-1
Updated
2026-11-02
OSVUSN-4394-1 No score

sqlite3 vulnerabilities

It was discovered that SQLite incorrectly handled certain corruped schemas. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 18.04 LTS. (CVE-2018-8740)

It was discovered that SQLite incorrectly handled certain SELECT statements. An attacker could possibly use this issue to cause a denial of service. This issue was only addressed in Ubuntu 19.10. (CVE-2019-19603)

It was discovered that SQLite incorrectly handled certain self-referential views. An attacker could possibly use this issue to cause a denial of service. This issue was only addressed in Ubuntu 19.10. (CVE-2019-19645)

Henry Liu discovered that SQLite incorrectly handled certain malformed window-function queries. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 19.10 and Ubuntu 20.04 LTS. (CVE-2020-11655)

It was discovered that SQLite incorrectly handled certain string operations. An attacker could use this issue to cause SQLite to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2020-13434)

It was discovered that SQLite incorrectly handled certain expressions. An attacker could use this issue to cause SQLite to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 19.10 and Ubuntu 20.04 LTS. (CVE-2020-13435)

It was discovered that SQLite incorrectly handled certain fts3 queries. An attacker could use this issue to cause SQLite to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2020-13630)

It was discovered that SQLite incorrectly handled certain virtual table names. An attacker could possibly use this issue to cause a denial of service. This issue was only addressed in Ubuntu 19.10 and Ubuntu 20.04 LTS. (CVE-2020-13631)

It was discovered that SQLite incorrectly handled certain fts3 queries. An attacker could use this issue to cause SQLite to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2020-13632)

Record
USN-4394-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
sqlite
Alpine:v3.4
before 3.13.0-r2
3.13.0-r2
sqlite
Alpine:v3.5
before 3.15.2-r2
3.15.2-r2
sqlite
Alpine:v3.6
before 3.20.1-r2
3.20.1-r2
sqlite
Alpine:v3.7
before 3.21.0-r1
3.21.0-r1
lemon
TuxCare:OracleLinux:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite
TuxCare:OracleLinux:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite-devel
TuxCare:OracleLinux:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite-doc
TuxCare:OracleLinux:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite-tcl
TuxCare:OracleLinux:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
lemon
TuxCare:CentOS:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
Show 44 moreShow less
Affected packages
PackageAffectedFixed
sqlite
TuxCare:CentOS:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite-devel
TuxCare:CentOS:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite-doc
TuxCare:CentOS:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite-tcl
TuxCare:CentOS:6
before 3.6.20-1.el6_7.2.tuxcare.els4
3.6.20-1.el6_7.2.tuxcare.els4
sqlite3
Debian:12
before 3.22.0-2
3.22.0-2
sqlite3
Debian:13
before 3.22.0-2
3.22.0-2
sqlite3
Debian:14
before 3.22.0-2
3.22.0-2
sqlite3
Debian:8
before 3.8.7.1-1+deb8u4, plus listed versions
3.8.7.1-13.8.7.1-1+deb8u13.8.7.1-1+deb8u23.8.7.1-1+deb8u3
3.8.7.1-1+deb8u4
sqlite3
Debian:9
before 3.16.2-5+deb9u2, plus listed versions
3.16.2-53.16.2-5+deb9u1
3.16.2-5+deb9u2
sqlite
Debian:10
before 2.8.17-15+deb10u1, plus listed versions
2.8.17-15
2.8.17-15+deb10u1
sqlite3
Mageia:5
before 3.10.2-1.2.mga5
3.10.2-1.2.mga5
sqlite3
Mageia:6
before 3.17.0-2.2.mga6
3.17.0-2.2.mga6
sqlite
Mageia:8
before 2.8.17-26.1.mga8
2.8.17-26.1.mga8
sqlite3
SUSE:Linux Enterprise Desktop 12 SP3
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Desktop 12 SP4
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Software Development Kit 12 SP3
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Software Development Kit 12 SP4
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Server 12 SP3
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Server 12 SP4
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
before 3.8.10.2-9.6.1
3.8.10.2-9.6.1
sqlite3
SUSE:Linux Enterprise Server 12-LTSS
before 3.8.3.1-2.12.1
3.8.3.1-2.12.1
sqlite3
SUSE:HPE Helion OpenStack 8
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:OpenStack Cloud 8
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:OpenStack Cloud 9
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:OpenStack Cloud Crowbar 8
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:OpenStack Cloud Crowbar 9
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Software Development Kit 12 SP5
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server 12 SP2-BCL
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server 12 SP3-LTSS
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server 12 SP3-BCL
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server 12 SP4-LTSS
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server 12 SP5
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 3.36.0-9.18.1
3.36.0-9.18.1
sqlite3
Ubuntu:14.04:LTS
before 3.8.2-1ubuntu2.2, plus listed versions
3.7.17-1ubuntu13.8.0.2-1ubuntu13.8.1-1ubuntu13.8.1-1ubuntu33.8.2-1ubuntu13.8.2-1ubuntu23.8.2-1ubuntu2.1
3.8.2-1ubuntu2.2
sqlite3
Ubuntu:16.04:LTS
before 3.11.0-1ubuntu1.1, plus listed versions
3.8.11.1-13.9.1-23.9.2-13.10.0-13.10.1-13.10.2-13.11.0-1ubuntu1
3.11.0-1ubuntu1.1
sqlite3
Ubuntu:18.04:LTS
before 3.22.0-1ubuntu0.4, plus listed versions
3.19.3-33.20.1-23.21.0-13.22.0-13.22.0-1ubuntu0.13.22.0-1ubuntu0.23.22.0-1ubuntu0.3
3.22.0-1ubuntu0.4
sqlite3
Ubuntu:16.04:LTS
before 3.11.0-1ubuntu1.3, plus listed versions
3.8.11.1-13.9.1-23.9.2-13.10.0-13.10.1-1
Show 4 moreShow less
3.10.2-13.11.0-1ubuntu13.11.0-1ubuntu1.13.11.0-1ubuntu1.2
3.11.0-1ubuntu1.3
sqlite3
Ubuntu:18.04:LTS
before 3.22.0-1ubuntu0.2, plus listed versions
3.19.3-33.20.1-23.21.0-13.22.0-13.22.0-1ubuntu0.1
3.22.0-1ubuntu0.2
sqlite3
Ubuntu:16.04:LTS
before 3.11.0-1ubuntu1.5, plus listed versions
3.8.11.1-13.9.1-23.9.2-13.10.0-13.10.1-1
Show 6 moreShow less
3.10.2-13.11.0-1ubuntu13.11.0-1ubuntu1.13.11.0-1ubuntu1.23.11.0-1ubuntu1.33.11.0-1ubuntu1.4
3.11.0-1ubuntu1.5
sqlite3
Ubuntu:20.04:LTS
before 3.31.1-4ubuntu0.1, plus listed versions
3.29.0-23.30.1-13.30.1-1ubuntu13.31.1-1ubuntu13.31.1-33.31.1-4
3.31.1-4ubuntu0.1
sqlite3
openSUSE:Tumbleweed
before 3.36.0-1.2
3.36.0-1.2

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-8740 is a high vulnerability (CVSS 7.5) in Sqlite, published March 17, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 7.97%, the 94th percentile. Fixed in sqlite 3.13.0-r2.

References

Show 99 moreShow less
MoveEnter Open