{"id":"GHSA-8639-qx56-r428","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 -\u003e {Click on number} -\u003e 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","aliases":["CVE-2022-31000"],"modified":"2023-11-08T04:09:22.169642Z","published":"2022-06-01T20:26:37Z","database_specific":{"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2022-06-01T20:26:37Z","nvd_published_at":"2022-06-01T18:15:00Z","cwe_ids":["CWE-352"]},"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"}],"affected":[{"package":{"name":"solidus_backend","ecosystem":"RubyGems","purl":"pkg:gem/solidus_backend"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.11.16"}]}],"versions":["1.0.0","1.0.0.pre","1.0.0.pre2","1.0.0.pre3","1.0.0.rc1","1.0.0.rc2","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.1.0","1.1.0.beta1","1.1.0.pre1","1.1.0.pre2","1.1.1","1.1.2","1.1.3","1.1.4","1.2.0","1.2.0.beta1","1.2.0.rc1","1.2.0.rc2","1.2.1","1.2.2","1.2.3","1.3.0","1.3.0.beta1","1.3.0.rc1","1.3.0.rc2","1.3.1","1.3.2","1.4.0","1.4.0.beta1","1.4.0.rc1","1.4.1","1.4.2","2.0.0","2.0.0.beta1","2.0.0.rc1","2.0.1","2.0.2","2.0.3","2.1.0","2.1.0.beta1","2.1.0.rc1","2.1.1","2.10.0","2.10.0.beta1","2.10.1","2.10.2","2.10.3","2.10.5","2.11.0","2.11.1","2.11.10","2.11.11","2.11.12","2.11.13","2.11.14","2.11.15","2.11.2","2.11.3","2.11.4","2.11.5","2.11.6","2.11.7","2.11.8","2.11.9","2.2.0","2.2.0.beta1","2.2.0.rc1","2.2.1","2.2.2","2.3.0","2.3.0.beta1","2.3.0.rc1","2.3.0.rc2","2.3.0.rc3","2.3.1","2.4.0","2.4.0.beta1","2.4.0.rc1","2.4.1","2.4.2","2.5.0","2.5.0.beta1","2.5.0.beta2","2.5.0.rc1","2.5.1","2.5.2","2.6.0","2.6.0.rc1","2.6.1","2.6.2","2.6.3","2.6.4","2.6.5","2.6.6","2.7.0","2.7.1","2.7.2","2.7.3","2.7.4","2.8.0","2.8.1","2.8.2","2.8.3","2.8.4","2.8.5","2.8.6","2.9.0","2.9.0.rc.1","2.9.1","2.9.2","2.9.3","2.9.4","2.9.5","2.9.6"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-8639-qx56-r428/GHSA-8639-qx56-r428.json"}},{"package":{"name":"solidus_backend","ecosystem":"RubyGems","purl":"pkg:gem/solidus_backend"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.6"}]}],"versions":["3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-8639-qx56-r428/GHSA-8639-qx56-r428.json"}},{"package":{"name":"solidus_backend","ecosystem":"RubyGems","purl":"pkg:gem/solidus_backend"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1.0"},{"fixed":"3.1.6"}]}],"versions":["3.1.0","3.1.1","3.1.2","3.1.3","3.1.4","3.1.5"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-8639-qx56-r428/GHSA-8639-qx56-r428.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N"}]}