CVE-2023-50725: Resque Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-gc3j-vvwf-4rp8
CVSS 6.3
CWE-233 CWE-79
Published
Advisory Summary

CVE-2023-50725 is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-233: Improper Handling of Parameters) affecting Resque libraries in the RubyGems ecosystem. The issue involves resque vulnerable to reflected xss in resque-web failed and queues lists. Remediation is available by upgrading affected packages to version 2.2.1.

CVE-2023-50725 at a Glance

CVE Identifier CVE-2023-50725
GHSA Identifier GHSA-gc3j-vvwf-4rp8
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-233: Improper Handling of Parameters
Affected Product Resque
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.3

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

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

How to Fix CVE-2023-50725

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

resque fixed: 2.2.1
Upgrade resque to 2.2.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 resque

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-50725, inspect your project dependencies for Resque:

inspect dependencies for resque

Analyze the terminal output to locate any version of Resque in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.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 CWE-233: Improper Handling of Parameters, where the product does not properly handle when the expected number of parameters, fields, or arguments is not provided in input, or if those parameters are undefined. In Resque, 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 The following paths in resque-web have been found to be vulnerable to reflected XSS: ``` /failed/?class=<script>alert(document.cookie)</script> /queues/><img src=a onerror=alert(document.cookie)> ``` ### Patches v2.2.1 ### Workarounds No known workarounds at this time. It is recommended to not click on 3rd party or untrusted links to the resque-web interface until you have patched your application. ### References https://github.com/resque/resque/pull/1790

CVE-2023-50725 Affected Resque Versions

1 component(s)
Fixed Versions:
2.2.1
Product / Package Ecosystem Affected Versions Fixed Version
resque
RubyGems
< 2.2.1
2.2.1

References

Frequently Asked Questions

What is CVE-2023-50725?
CVE-2023-50725 is a security vulnerability in Resque involving Resque vulnerable to reflected XSS in resque-web failed and queues lists under CWE-233: Improper Handling of Parameters.
Which Resque versions are affected?
Affected versions include releases prior to 2.2.1 across affected packages: resque.
What version fixes CVE-2023-50725?
Upgrading to 2.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is resque affected?
Yes, resque is affected in releases prior to 2.2.1. Upgrade your dependency to 2.2.1 or later.
What is the CVSS score of CVE-2023-50725?
CVE-2023-50725 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2023-50725?
CVE-2023-50725 is classified under CWE-233: Improper Handling of Parameters (The product does not properly handle when the expected number of parameters, fields, or arguments is not provided in input, or if those parameters are undefined.).
How can I check RubyGems dependencies for CVE-2023-50725?
Run the dependency tree command: 'inspect dependencies for resque'. 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-gc3j-vvwf-4rp8",
  "modified" : "2023-12-22T22:26:56Z",
  "published" : "2023-12-18T19:34:06Z",
  "aliases" : [ "CVE-2023-50725" ],
  "summary" : "Resque vulnerable to reflected XSS in resque-web failed and queues lists",
  "details" : "### Impact\n\nThe following paths in resque-web have been found to be vulnerable to reflected XSS:\n\n```\n/failed/?class=<script>alert(document.cookie)</script>\n/queues/><img src=a onerror=alert(document.cookie)>\n```\n\n### Patches\n\nv2.2.1\n\n### Workarounds\n\nNo known workarounds at this time. It is recommended to not click on 3rd party or untrusted links to the resque-web interface until you have patched your application.\n\n### References\n\nhttps://github.com/resque/resque/pull/1790\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "resque"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/resque/resque/security/advisories/GHSA-gc3j-vvwf-4rp8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50725"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/resque/resque/pull/1790"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/resque/resque/commit/ee99d2ed6cc75d9d384483b70c2d96d312115f07"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/resque/resque"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/resque/CVE-2023-50725.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-233", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-18T19:34:06Z",
    "nvd_published_at" : "2023-12-22T20:15:07Z"
  }
}