CVE-2017-11173: Rack cors Missing Regex Anchor Vulnerability

HIGH
Advisory Identifier: GHSA-2j9c-9vmv-7m39
CVSS 8.8
Published
Advisory Summary

CVE-2017-11173 is a HIGH (CVSS 8.8) missing regex anchor vulnerability (General Security Weakness) affecting Rack cors libraries in the RubyGems ecosystem. The issue involves missing regex anchor in rack-cors allows malicious third party site to perform cors request. Remediation is available by upgrading affected packages to version 0.4.1.

CVE-2017-11173 at a Glance

CVE Identifier CVE-2017-11173
GHSA Identifier GHSA-2j9c-9vmv-7m39
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification General Security Weakness
Affected Product Rack cors
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:U/C:H/I:H/A:H).

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

How to Fix CVE-2017-11173

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

rack-cors fixed: 0.4.1
Upgrade rack-cors to 0.4.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 rack-cors

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-11173, inspect your project dependencies for Rack cors:

inspect dependencies for rack-cors

Analyze the terminal output to locate any version of Rack cors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.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 General Security Weakness. In Rack cors, 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

Missing anchor in generated regex for rack-cors before 0.4.1 allows a malicious third-party site to perform CORS requests. If the configuration were intended to allow only the trusted `example.com` domain name and not the malicious `example.net` domain name, then `example.com.example.net` (as well as `example.com-example.net`) would be inadvertently allowed.

CVE-2017-11173 Affected Rack cors Versions

1 component(s)
Fixed Versions:
0.4.1
Product / Package Ecosystem Affected Versions Fixed Version
rack-cors
RubyGems
< 0.4.1
0.4.1

References

Frequently Asked Questions

What is CVE-2017-11173?
CVE-2017-11173 is a security vulnerability in Rack cors involving Missing Regex anchor in Rack-Cors allows malicious third party site to perform CORS request under General Security Weakness.
Which Rack cors versions are affected?
Affected versions include releases prior to 0.4.1 across affected packages: rack-cors.
What version fixes CVE-2017-11173?
Upgrading to 0.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rack-cors affected?
Yes, rack-cors is affected in releases prior to 0.4.1. Upgrade your dependency to 0.4.1 or later.
What is the CVSS score of CVE-2017-11173?
CVE-2017-11173 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-11173?
CVE-2017-11173 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2017-11173?
Run the dependency tree command: 'inspect dependencies for rack-cors'. 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-2j9c-9vmv-7m39",
  "modified" : "2023-09-05T21:45:13Z",
  "published" : "2018-07-31T18:18:39Z",
  "aliases" : [ "CVE-2017-11173" ],
  "summary" : "Missing Regex anchor in Rack-Cors allows malicious third party site to perform CORS request",
  "details" : "Missing anchor in generated regex for rack-cors before 0.4.1 allows a malicious third-party site to perform CORS requests. If the configuration were intended to allow only the trusted `example.com` domain name and not the malicious `example.net` domain name, then `example.com.example.net` (as well as `example.com-example.net`) would be inadvertently allowed.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack-cors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-11173"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cyu/rack-cors/commit/42ebe6caa8e85ffa9c8a171bda668ba1acc7a5e6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cyu/rack-cors"
  }, {
    "type" : "WEB",
    "url" : "https://packetstormsecurity.com/files/143345/rack-cors-Missing-Anchor.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2017/Jul/22"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2017/dsa-3931"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:52:24Z",
    "nvd_published_at" : null
  }
}