GHSA-mgvv-5mxp-xq67: Sqlite3 SQLite3 Addresses Vulnerability Vulnerability

LOW
Published
Advisory Summary

GHSA-mgvv-5mxp-xq67 is a LOW sqlite3 addresses vulnerability vulnerability (General Security Weakness) affecting Sqlite3 libraries in the RubyGems ecosystem. The issue involves sqlite3 addresses vulnerability in packaged version of libsqlite. Remediation is available by upgrading affected packages to version 1.5.1.

GHSA-mgvv-5mxp-xq67 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mgvv-5mxp-xq67
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Sqlite3
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix GHSA-mgvv-5mxp-xq67

To remediate this vulnerability, upgrade all affected Sqlite3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sqlite3 fixed: 1.5.1
Upgrade sqlite3 to 1.5.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for sqlite3

How to Check if You Are Affected

To determine whether your application is affected by GHSA-mgvv-5mxp-xq67, inspect your project dependencies for Sqlite3:

inspect dependencies for sqlite3

Analyze the terminal output to locate any version of Sqlite3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Sqlite3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The rubygem sqlite3 v1.5.1 upgrades the packaged version of libsqlite from v3.39.3 to [v3.39.4](https://sqlite.org/releaselog/3_39_4.html). libsqlite v3.39.4 addresses a vulnerability described as follows in the release notification: > Version 3.39.4 is a minimal patch against the prior release that addresses issues found since the > prior release. In particular, a potential vulnerability in the FTS3 extension has been fixed, so > this should be considered a security update. > > In order to exploit the vulnerability, an attacker must have full SQL access and must be able to > construct a corrupt database with over 2GB of FTS3 content. The problem arises from a 32-bit > signed integer overflow. This vulnerability has not been assigned a CVE and does not have a severity declared. Please note that this advisory only applies to the sqlite3 gem v1.5.0, and only if the packaged libsqlite is being used. If you've overridden defaults at installation time to use system libraries instead of packaged libraries, you should instead pay attention to your distro's libsqlite release announcements. ### Mitigation Upgrade to the rubygem sqlite3 v1.5.1 or later. Users who are unable to upgrade the sqlite3 gem may also choose a more complicated mitigation: compile and link sqlite3 against external libsqlite >= 3.39.4 which will also address these same issues. ### References - Upstream release notes: https://sqlite.org/releaselog/3_39_4.html - Instructions for compiling against system libraries: https://github.com/sparklemotion/sqlite3-ruby

GHSA-mgvv-5mxp-xq67 Affected Sqlite3 Versions

1 component(s)
Fixed Versions:
1.5.1
Product / Package Ecosystem Affected Versions Fixed Version
sqlite3
RubyGems
≥ 1.5.0
< 1.5.1
All 1 versions
1.5.0
1.5.1

References

Frequently Asked Questions

What is GHSA-mgvv-5mxp-xq67?
GHSA-mgvv-5mxp-xq67 is a security vulnerability in Sqlite3 involving SQLite3 addresses vulnerability in packaged version of libsqlite under General Security Weakness.
Which Sqlite3 versions are affected?
Affected versions include releases prior to 1.5.1 across affected packages: sqlite3.
What version fixes GHSA-mgvv-5mxp-xq67?
Upgrading to 1.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sqlite3 affected?
Yes, sqlite3 is affected in releases prior to 1.5.1. Upgrade your dependency to 1.5.1 or later.
What CWE is associated with GHSA-mgvv-5mxp-xq67?
GHSA-mgvv-5mxp-xq67 is classified under General Security Weakness.
How can I check RubyGems dependencies for GHSA-mgvv-5mxp-xq67?
Run the dependency tree command: 'inspect dependencies for sqlite3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mgvv-5mxp-xq67",
  "modified" : "2022-10-03T22:12:28Z",
  "published" : "2022-10-03T22:12:28Z",
  "aliases" : [ ],
  "summary" : "SQLite3 addresses vulnerability in packaged version of libsqlite",
  "details" : "### Summary\n\nThe rubygem sqlite3 v1.5.1 upgrades the packaged version of libsqlite from v3.39.3 to [v3.39.4](https://sqlite.org/releaselog/3_39_4.html).\n\nlibsqlite v3.39.4 addresses a vulnerability described as follows in the release notification:\n\n> Version 3.39.4 is a minimal patch against the prior release that addresses issues found since the\n> prior release. In particular, a potential vulnerability in the FTS3 extension has been fixed, so\n> this should be considered a security update.\n>\n> In order to exploit the vulnerability, an attacker must have full SQL access and must be able to\n> construct a corrupt database with over 2GB of FTS3 content. The problem arises from a 32-bit\n> signed integer overflow.\n\nThis vulnerability has not been assigned a CVE and does not have a severity declared.\n\nPlease note that this advisory only applies to the sqlite3 gem v1.5.0, and only if the packaged libsqlite is being used. If you've overridden defaults at installation time to use system libraries instead of packaged libraries, you should instead pay attention to your distro's libsqlite release announcements.\n\n\n### Mitigation\n\nUpgrade to the rubygem sqlite3 v1.5.1 or later.\n\nUsers who are unable to upgrade the sqlite3 gem may also choose a more complicated mitigation: compile and link sqlite3 against external libsqlite >= 3.39.4 which will also address these same issues.\n\n\n### References\n\n- Upstream release notes: https://sqlite.org/releaselog/3_39_4.html\n- Instructions for compiling against system libraries: https://github.com/sparklemotion/sqlite3-ruby",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sqlite3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.1"
      } ]
    } ],
    "versions" : [ "1.5.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/sqlite3-ruby/security/advisories/GHSA-mgvv-5mxp-xq67"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sparklemotion/sqlite3-ruby"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/sqlite3-ruby/releases/tag/v1.5.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-03T22:12:28Z",
    "nvd_published_at" : null
  }
}