Vulnerabilities in pkg:gem/solidus_backend

PACKAGE
Advisory Identifier: GHSA-8639-qx56-r428
Advisory Summary

CVE-2022-31000 is a LOW (CVSS 2.3) csrf allows attacker to finalize/unfinalize vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Solidus backend libraries in the RubyGems ecosystem. The issue involves csrf allows attacker to finalize/unfinalize order adjustments in solidus_backend. Remediation is available by upgrading affected packages to version 2.11.16, 3.0.6, 3.1.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/solidus_backend

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/solidus_backend. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8639-qx56-r428 CVE-2022-31000 LOW CSRF allows attacker to finalize/unfinalize order adjustments in solidus_backend

CVE-2022-31000 at a Glance

CVE Identifier CVE-2022-31000
GHSA Identifier GHSA-8639-qx56-r428
Severity LOW
CVSS v3.1 Base Score 2.3
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Solidus backend
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 2.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2022-31000

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

solidus_backend fixed: 2.11.16
Upgrade solidus_backend to 2.11.16
solidus_backend fixed: 3.0.6
Upgrade solidus_backend to 3.0.6
solidus_backend fixed: 3.1.6
Upgrade solidus_backend to 3.1.6
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 solidus_backend

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-31000, inspect your project dependencies for Solidus backend:

inspect dependencies for solidus_backend

Analyze the terminal output to locate any version of Solidus backend in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.16), 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 CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Solidus backend, 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

### Impact CSRF vulnerability allowing attackers to change the state of an order's adjustments if they hold its number, and the execution happens on a store administrator's computer. Reproduction steps: - Take an order's number. - Log in as an administrator. - Visit that order's adjustments section (_Orders -> {Click on number} -> Adjustments_) and check that its adjustments are finalized (closed padlock under the **State** column). - On another tab, visit `{your_site_url}/admin/orders/{order_number}/adjustments/unfinalize`. - Notice how the adjustments are unfinalized (open padlock), even if the previous was a `GET` request which could have been linked from any other site. - Visit `{your_site_url}/admin/orders/{order_number}/adjustments/finalize`. - Notice how the adjustments are again finalized. That happened because both routes were handled as `GET` requests, which are skipped by Rails anti-forgery protection. ### Patches Users should upgrade to solidus_backend v3.1.6, v3.0.6, or v2.11.16, depending on the major and minor versions in use. ### References - [Rails CSRF protection](https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html). ### For more information If you have any questions or comments about this advisory: - Open an [issue](https://github.com/solidusio/solidus/issues) or a [discussion](https://github.com/solidusio/solidus/discussions) in Solidus. - Email us at [security@solidus.io](mailto:security@soliidus.io) - Contact the core team on [Slack](http://slack.solidus.io/)

CVE-2022-31000 Affected Solidus backend Versions

3 component(s)
Fixed Versions:
2.11.163.0.63.1.6
Product / Package Ecosystem Affected Versions Fixed Version
solidus_backend
RubyGems
< 2.11.16
2.11.16
solidus_backend
RubyGems
≥ 3.0.0
< 3.0.6
3.0.6
solidus_backend
RubyGems
≥ 3.1.0
< 3.1.6
3.1.6

References

Frequently Asked Questions

What is CVE-2022-31000?
CVE-2022-31000 is a security vulnerability in Solidus backend involving CSRF allows attacker to finalize/unfinalize order adjustments in solidus_backend under CWE-352: Cross-Site Request Forgery (CSRF).
Which Solidus backend versions are affected?
Affected versions include releases prior to 2.11.16, 3.0.6, 3.1.6 across affected packages: solidus_backend.
What version fixes CVE-2022-31000?
Upgrading to 2.11.16, 3.0.6, 3.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is solidus_backend affected?
Yes, solidus_backend is affected in releases prior to 2.11.16, 3.0.6, 3.1.6. Upgrade your dependency to 2.11.16, 3.0.6, 3.1.6 or later.
What is the CVSS score of CVE-2022-31000?
CVE-2022-31000 has a CVSS v3.1 base score of 2.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2022-31000?
CVE-2022-31000 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check RubyGems dependencies for CVE-2022-31000?
Run the dependency tree command: 'inspect dependencies for solidus_backend'. 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-8639-qx56-r428",
  "modified" : "2022-06-01T20:26:37Z",
  "published" : "2022-06-01T20:26:37Z",
  "aliases" : [ "CVE-2022-31000" ],
  "summary" : "CSRF allows attacker to finalize/unfinalize order adjustments in solidus_backend",
  "details" : "### Impact\nCSRF vulnerability allowing attackers to change the state of an order's adjustments if they hold its number, and the execution happens on a store administrator's computer.\n\nReproduction steps:\n- Take an order's number.\n- Log in as an administrator.\n- Visit that order's adjustments section (_Orders -> {Click on number} -> Adjustments_) and check that its adjustments are finalized (closed padlock under the **State** column).\n- On another tab, visit `{your_site_url}/admin/orders/{order_number}/adjustments/unfinalize`.\n- Notice how the adjustments are unfinalized (open padlock), even if the previous was a `GET` request which could have been linked from any other site.\n- Visit `{your_site_url}/admin/orders/{order_number}/adjustments/finalize`.\n- Notice how the adjustments are again finalized.\n\nThat happened because both routes were handled as `GET` requests, which are skipped by Rails anti-forgery protection.\n\n### Patches\nUsers should upgrade to solidus_backend v3.1.6, v3.0.6, or v2.11.16, depending on the major and minor versions in use.\n\n### References\n- [Rails CSRF protection](https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html).\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Open an [issue](https://github.com/solidusio/solidus/issues) or a [discussion](https://github.com/solidusio/solidus/discussions) in Solidus.\n- Email us at [security@solidus.io](mailto:security@soliidus.io)\n- Contact the core team on [Slack](http://slack.solidus.io/)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "solidus_backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.11.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "solidus_backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "solidus_backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/solidusio/solidus/security/advisories/GHSA-8639-qx56-r428"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31000"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/solidusio/solidus/commit/de796a2e0be7f154cae48b46e267501559d9716c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/solidus_backend/CVE-2022-31000.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/solidusio/solidus"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-01T20:26:37Z",
    "nvd_published_at" : "2022-06-01T18:15:00Z"
  }
}