GSD-2022-35956

Vulnerability from gsd - Updated: 2022-08-11 00:00
Details
Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version >= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql.
Aliases

{
  "GSD": {
    "alias": "CVE-2022-35956",
    "description": "This Rails gem adds two methods to the ActiveRecord::Base class that allow you to update many records on a single database hit, using a case sql statement for it. Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version \u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql.",
    "id": "GSD-2022-35956"
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "affected": [
        {
          "package": {
            "ecosystem": "RubyGems",
            "name": "update_by_case",
            "purl": "pkg:gem/update_by_case"
          }
        }
      ],
      "aliases": [
        "CVE-2022-35956",
        "GHSA-33wh-w4m7-c6r8"
      ],
      "details": "Before version 0.1.3 `update_by_case` gem used custom sql strings, and\nit was not sanitized, making it vulnerable to sql injection. Upgrade to version\n\u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with\nsanitized sql.\n",
      "id": "GSD-2022-35956",
      "modified": "2022-08-11T00:00:00.000Z",
      "published": "2022-08-11T00:00:00.000Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8"
        }
      ],
      "schema_version": "1.4.0",
      "severity": [
        {
          "score": 5.8,
          "type": "CVSS_V3"
        }
      ],
      "summary": "update_by_case before 0.1.3 can be vulnerable to sql injection"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2022-35956",
        "STATE": "PUBLIC",
        "TITLE": "update_by_case before 0.1.3 vulnerable to sql injection"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "activerecord-update-by-case",
                    "version": {
                      "version_data": [
                        {
                          "version_value": "\u003c 0.1.3"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "camilova"
            }
          ]
        }
      },
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "This Rails gem adds two methods to the ActiveRecord::Base class that allow you to update many records on a single database hit, using a case sql statement for it. Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version \u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql."
          }
        ]
      },
      "impact": {
        "cvss": {
          "attackComplexity": "HIGH",
          "attackVector": "NETWORK",
          "availabilityImpact": "LOW",
          "baseScore": 5.8,
          "baseSeverity": "MEDIUM",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "privilegesRequired": "NONE",
          "scope": "CHANGED",
          "userInteraction": "REQUIRED",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L",
          "version": "3.1"
        }
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "lang": "eng",
                "value": "CWE-89: Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8",
            "refsource": "CONFIRM",
            "url": "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8"
          },
          {
            "name": "https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable",
            "refsource": "MISC",
            "url": "https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable"
          }
        ]
      },
      "source": {
        "advisory": "GHSA-33wh-w4m7-c6r8",
        "discovery": "UNKNOWN"
      }
    },
    "github.com/rubysec/ruby-advisory-db": {
      "cve": "2022-35956",
      "cvss_v3": 5.8,
      "date": "2022-08-11",
      "description": "Before version 0.1.3 `update_by_case` gem used custom sql strings, and\nit was not sanitized, making it vulnerable to sql injection. Upgrade to version\n\u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with\nsanitized sql.\n",
      "gem": "update_by_case",
      "ghsa": "33wh-w4m7-c6r8",
      "patched_versions": [
        "\u003e= 0.1.3"
      ],
      "title": "update_by_case before 0.1.3 can be vulnerable to sql injection",
      "url": "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8"
    },
    "gitlab.com": {
      "advisories": [
        {
          "affected_range": "\u003c0.1.3",
          "affected_versions": "All versions before 0.1.3",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
          "cwe_ids": [
            "CWE-1035",
            "CWE-89",
            "CWE-937"
          ],
          "date": "2022-08-16",
          "description": "This Rails gem adds two methods to the ActiveRecord::Base class that allow you to update many records on a single database hit, using a case sql statement for it. Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version \u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql.",
          "fixed_versions": [
            "0.1.3"
          ],
          "identifier": "CVE-2022-35956",
          "identifiers": [
            "CVE-2022-35956",
            "GHSA-33wh-w4m7-c6r8",
            "GMS-2022-3603"
          ],
          "not_impacted": "All versions starting from 0.1.3",
          "package_slug": "gem/update_by_case",
          "pubdate": "2022-08-12",
          "solution": "Upgrade to version 0.1.3 or above.",
          "title": "Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)",
          "urls": [
            "https://nvd.nist.gov/vuln/detail/CVE-2022-35956",
            "https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable",
            "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8",
            "https://github.com/advisories/GHSA-33wh-w4m7-c6r8"
          ],
          "uuid": "372fd61b-e78c-41e1-ab9e-b4830bdea3b8"
        },
        {
          "affected_range": "\u003c0",
          "affected_versions": "All versions before 0.1.3",
          "cwe_ids": [
            "CWE-1035",
            "CWE-937"
          ],
          "date": "2022-08-11",
          "description": "Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version \u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql.",
          "fixed_versions": [
            "0.1.3"
          ],
          "identifier": "GMS-2022-3603",
          "identifiers": [
            "GHSA-33wh-w4m7-c6r8",
            "GMS-2022-3603",
            "CVE-2022-35956"
          ],
          "not_impacted": "All versions starting from 0.1.3",
          "package_slug": "gem/update_by_case",
          "pubdate": "2022-08-11",
          "solution": "Upgrade to version 0.1.3 or above.",
          "title": "Duplicate of ./gem/update_by_case/CVE-2022-35956.yml",
          "urls": [
            "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8",
            "https://github.com/advisories/GHSA-33wh-w4m7-c6r8"
          ],
          "uuid": "ebd008a5-75f9-4f6e-a524-2353ef16ad83"
        }
      ]
    },
    "nvd.nist.gov": {
      "configurations": {
        "CVE_data_version": "4.0",
        "nodes": [
          {
            "children": [],
            "cpe_match": [
              {
                "cpe23Uri": "cpe:2.3:a:update_by_case_project:update_by_case:*:*:*:*:*:ruby:*:*",
                "cpe_name": [],
                "versionEndExcluding": "0.1.3",
                "vulnerable": true
              }
            ],
            "operator": "OR"
          }
        ]
      },
      "cve": {
        "CVE_data_meta": {
          "ASSIGNER": "security-advisories@github.com",
          "ID": "CVE-2022-35956"
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "en",
              "value": "This Rails gem adds two methods to the ActiveRecord::Base class that allow you to update many records on a single database hit, using a case sql statement for it. Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version \u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql."
            }
          ]
        },
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "en",
                  "value": "CWE-89"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable",
              "refsource": "MISC",
              "tags": [
                "Release Notes",
                "Third Party Advisory"
              ],
              "url": "https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable"
            },
            {
              "name": "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8",
              "refsource": "CONFIRM",
              "tags": [
                "Third Party Advisory"
              ],
              "url": "https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8"
            }
          ]
        }
      },
      "impact": {
        "baseMetricV3": {
          "cvssV3": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "exploitabilityScore": 3.9,
          "impactScore": 5.9
        }
      },
      "lastModifiedDate": "2022-08-16T16:09Z",
      "publishedDate": "2022-08-12T21:15Z"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.