CVE-2023-30614: Pay Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-cqf3-vpx7-rxhw
CVSS 7.1
CWE-79
Published
Advisory Summary

CVE-2023-30614 is a HIGH (CVSS 7.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Pay libraries in the RubyGems ecosystem. The issue involves improper neutralization of script-related html tags in a web page (basic xss) in pay. Remediation is available by upgrading affected packages to version 6.3.2.

CVE-2023-30614 at a Glance

CVE Identifier CVE-2023-30614
GHSA Identifier GHSA-cqf3-vpx7-rxhw
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Pay
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.1

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

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

How to Fix CVE-2023-30614

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

pay fixed: 6.3.2
Upgrade pay to 6.3.2
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 pay

How to Check if You Are Affected

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

inspect dependencies for pay

Analyze the terminal output to locate any version of Pay in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.3.2), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Pay, 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 A payments info page of Pay is susceptible to reflected Cross-site scripting. An attacker could create a working URL that renders a javascript link to a user on a Rails application that integrates Pay. This URL could be distributed via email to specifically target certain individuals. If the targeted application contains a functionality to submit user-generated content (such as comments) the attacker could even distribute the URL using that functionality. ### Patches This has been patched in version 6.3.2 and above. Pay will now sanitize the `back` parameter and only permit relative paths.

CVE-2023-30614 Affected Pay Versions

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

References

Frequently Asked Questions

What is CVE-2023-30614?
CVE-2023-30614 is a security vulnerability in Pay involving Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in Pay under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Pay versions are affected?
Affected versions include releases prior to 6.3.2 across affected packages: pay.
What version fixes CVE-2023-30614?
Upgrading to 6.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pay affected?
Yes, pay is affected in releases prior to 6.3.2. Upgrade your dependency to 6.3.2 or later.
What is the CVSS score of CVE-2023-30614?
CVE-2023-30614 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2023-30614?
CVE-2023-30614 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check RubyGems dependencies for CVE-2023-30614?
Run the dependency tree command: 'inspect dependencies for pay'. 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-cqf3-vpx7-rxhw",
  "modified" : "2023-04-20T21:28:48Z",
  "published" : "2023-04-20T21:28:48Z",
  "aliases" : [ "CVE-2023-30614" ],
  "summary" : "Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in Pay",
  "details" : "### Impact\nA payments info page of Pay is susceptible to reflected Cross-site scripting. An attacker could create a working URL that renders a javascript link to a user on a Rails application that integrates Pay. This URL could be distributed via email to specifically target certain individuals. If the targeted application contains a functionality to submit user-generated content (such as comments) the attacker could even distribute the URL using that functionality.\n\n### Patches\nThis has been patched in version 6.3.2 and above.\n\nPay will now sanitize the `back` parameter and only permit relative paths.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "pay"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pay-rails/pay/security/advisories/GHSA-cqf3-vpx7-rxhw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30614"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pay-rails/pay/commit/5d6283a24062bd272a524ec48415f536a67ad57f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pay-rails/pay/commit/c067771d8c7514acde4b948b474caf054bb0e25d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pay-rails/pay"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/pay/CVE-2023-30614.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-04-20T21:28:48Z",
    "nvd_published_at" : "2023-04-19T18:15:07Z"
  }
}