CVE-2021-39185 (GCVE-0-2021-39185)

Vulnerability from cvelistv5 – Published: 2021-09-01 19:25 – Updated: 2024-08-04 01:58
VLAI
Title
Default CORS config allows any origin with credentials
Summary
Http4s is a minimal, idiomatic Scala interface for HTTP services. In http4s versions 0.21.26 and prior, 0.22.0 through 0.22.2, 0.23.0, 0.23.1, and 1.0.0-M1 through 1.0.0-M24, the default CORS configuration is vulnerable to an origin reflection attack. The middleware is also susceptible to a Null Origin Attack. The problem is fixed in 0.21.27, 0.22.3, 0.23.2, and 1.0.0-M25. The original `CORS` implementation and `CORSConfig` are deprecated. See the GitHub GHSA for more information, including code examples and workarounds.
CWE
  • CWE-346 - Origin Validation Error
Assigner
GitHub_M CNA under the mitre root
CNA scorecard C 72/100 over 7856 records in the last 180 days details
References
Impacted products
Vendor Product Version CPE status
http4s http4s Affected: < 0.21.27
Affected: >= 0.22.0, < 0.22.3
Affected: >= 0.23.0, < 0.23.2
Affected: >= 1.0.0-M1, <= 1.0.0-M24
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T01:58:18.235Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6"
          },
          {
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/http4s/http4s/releases/tag/v0.23.2"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "http4s",
          "vendor": "http4s",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 0.21.27"
            },
            {
              "status": "affected",
              "version": "\u003e= 0.22.0, \u003c 0.22.3"
            },
            {
              "status": "affected",
              "version": "\u003e= 0.23.0, \u003c 0.23.2"
            },
            {
              "status": "affected",
              "version": "\u003e= 1.0.0-M1, \u003c= 1.0.0-M24"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "Http4s is a minimal, idiomatic Scala interface for HTTP services. In http4s versions 0.21.26 and prior, 0.22.0 through 0.22.2, 0.23.0, 0.23.1, and 1.0.0-M1 through 1.0.0-M24, the default CORS configuration is vulnerable to an origin reflection attack. The middleware is also susceptible to a Null Origin Attack. The problem is fixed in 0.21.27, 0.22.3, 0.23.2, and 1.0.0-M25. The original `CORS` implementation and `CORSConfig` are deprecated. See the GitHub GHSA for more information, including code examples and workarounds."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 9.1,
            "baseSeverity": "CRITICAL",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-346",
              "description": "CWE-346: Origin Validation Error",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2021-09-01T19:25:09.000Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6"
        },
        {
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/http4s/http4s/releases/tag/v0.23.2"
        }
      ],
      "source": {
        "advisory": "GHSA-52cf-226f-rhr6",
        "discovery": "UNKNOWN"
      },
      "title": "Default CORS config allows any origin with credentials",
      "x_legacyV4Record": {
        "CVE_data_meta": {
          "ASSIGNER": "security-advisories@github.com",
          "ID": "CVE-2021-39185",
          "STATE": "PUBLIC",
          "TITLE": "Default CORS config allows any origin with credentials"
        },
        "affects": {
          "vendor": {
            "vendor_data": [
              {
                "product": {
                  "product_data": [
                    {
                      "product_name": "http4s",
                      "version": {
                        "version_data": [
                          {
                            "version_value": "\u003c 0.21.27"
                          },
                          {
                            "version_value": "\u003e= 0.22.0, \u003c 0.22.3"
                          },
                          {
                            "version_value": "\u003e= 0.23.0, \u003c 0.23.2"
                          },
                          {
                            "version_value": "\u003e= 1.0.0-M1, \u003c= 1.0.0-M24"
                          }
                        ]
                      }
                    }
                  ]
                },
                "vendor_name": "http4s"
              }
            ]
          }
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "eng",
              "value": "Http4s is a minimal, idiomatic Scala interface for HTTP services. In http4s versions 0.21.26 and prior, 0.22.0 through 0.22.2, 0.23.0, 0.23.1, and 1.0.0-M1 through 1.0.0-M24, the default CORS configuration is vulnerable to an origin reflection attack. The middleware is also susceptible to a Null Origin Attack. The problem is fixed in 0.21.27, 0.22.3, 0.23.2, and 1.0.0-M25. The original `CORS` implementation and `CORSConfig` are deprecated. See the GitHub GHSA for more information, including code examples and workarounds."
            }
          ]
        },
        "impact": {
          "cvss": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 9.1,
            "baseSeverity": "CRITICAL",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
            "version": "3.1"
          }
        },
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "eng",
                  "value": "CWE-346: Origin Validation Error"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6",
              "refsource": "CONFIRM",
              "url": "https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6"
            },
            {
              "name": "https://github.com/http4s/http4s/releases/tag/v0.23.2",
              "refsource": "MISC",
              "url": "https://github.com/http4s/http4s/releases/tag/v0.23.2"
            }
          ]
        },
        "source": {
          "advisory": "GHSA-52cf-226f-rhr6",
          "discovery": "UNKNOWN"
        }
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2021-39185",
    "datePublished": "2021-09-01T19:25:09.000Z",
    "dateReserved": "2021-08-16T00:00:00.000Z",
    "dateUpdated": "2024-08-04T01:58:18.235Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2021-39185",
      "date": "2026-11-27",
      "epss": "0.00594",
      "percentile": "0.42447"
    },
    "nvd": {
      "cve": {
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "EA68C82D-88CA-4315-9FF9-DA0FE8223156",
                    "versionEndIncluding": "0.21.26",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "B4F97B04-29A9-4A32-BFC8-E971B72596F6",
                    "versionEndIncluding": "0.22.2",
                    "versionStartIncluding": "0.22.0",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:0.23.0:*:*:*:*:*:*:*",
                    "matchCriteriaId": "40C64FD8-E742-4D74-BCCD-C585A7E05A70",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:0.23.1:*:*:*:*:*:*:*",
                    "matchCriteriaId": "AB9E400F-E915-4E63-B580-F54C32CC8FA1",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone1:*:*:*:*:*:*",
                    "matchCriteriaId": "65C497F9-281C-4565-BD36-B6B4D7E6F8BD",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone10:*:*:*:*:*:*",
                    "matchCriteriaId": "6FCFC3E5-7530-4AAA-A2C7-36DC307B613B",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone11:*:*:*:*:*:*",
                    "matchCriteriaId": "D03CBFE3-0B31-4D7C-BC5D-61DCD3C2C486",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone12:*:*:*:*:*:*",
                    "matchCriteriaId": "76F8BC53-544C-4285-8D9B-CB91AD080048",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone13:*:*:*:*:*:*",
                    "matchCriteriaId": "778947CA-20BA-469F-87E1-97D8713ACC75",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone14:*:*:*:*:*:*",
                    "matchCriteriaId": "F5B02828-1E40-49BE-8367-10296625C696",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone15:*:*:*:*:*:*",
                    "matchCriteriaId": "A569F32F-3C8C-4F8F-B0BC-6ADC993596A9",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone16:*:*:*:*:*:*",
                    "matchCriteriaId": "525DBF4B-F574-459D-9CE2-6AF597ABAE10",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone17:*:*:*:*:*:*",
                    "matchCriteriaId": "FD05B15E-1E4F-43EA-B21A-3B96A77814D6",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone18:*:*:*:*:*:*",
                    "matchCriteriaId": "65C79F52-F05F-4F0A-AC27-393197B9EF00",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone19:*:*:*:*:*:*",
                    "matchCriteriaId": "A426B4C0-643A-492F-B7FB-725549F613F6",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone2:*:*:*:*:*:*",
                    "matchCriteriaId": "D95E231C-3D13-45FC-AF9A-CB8CF1FFC983",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone20:*:*:*:*:*:*",
                    "matchCriteriaId": "CF973F58-0AC7-4B58-A2CF-654133CE7F1A",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone21:*:*:*:*:*:*",
                    "matchCriteriaId": "35C40331-C96C-477C-B6BD-D5506E612DA8",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone22:*:*:*:*:*:*",
                    "matchCriteriaId": "615BC827-3E0F-4C1E-8FD2-B59FF31F2D49",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone23:*:*:*:*:*:*",
                    "matchCriteriaId": "FDFB35FD-4D08-4895-B1B6-FC03BCB3EB22",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone24:*:*:*:*:*:*",
                    "matchCriteriaId": "97F74D04-031E-47D4-BA57-DBE9C74CE256",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone3:*:*:*:*:*:*",
                    "matchCriteriaId": "DE093D65-1B3A-4A4A-BC76-05DEF9529712",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone4:*:*:*:*:*:*",
                    "matchCriteriaId": "DC3CA618-148D-4F97-9913-316DDDD97838",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone5:*:*:*:*:*:*",
                    "matchCriteriaId": "02FA538C-9D8A-49D5-8268-1A2C3E96B89B",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone6:*:*:*:*:*:*",
                    "matchCriteriaId": "D18A3ABC-5C47-45BF-978C-5BB17787DCFA",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone7:*:*:*:*:*:*",
                    "matchCriteriaId": "1CE1CF51-E61A-418A-AB22-9D7A6D690BAA",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone8:*:*:*:*:*:*",
                    "matchCriteriaId": "29A70AAA-B77A-4291-A700-C910362DB8D4",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:a:typelevel:http4s:1.0.0:milestone9:*:*:*:*:*:*",
                    "matchCriteriaId": "9F8F3C38-57AB-4CBC-8959-7FF51CBA7907",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "Http4s is a minimal, idiomatic Scala interface for HTTP services. In http4s versions 0.21.26 and prior, 0.22.0 through 0.22.2, 0.23.0, 0.23.1, and 1.0.0-M1 through 1.0.0-M24, the default CORS configuration is vulnerable to an origin reflection attack. The middleware is also susceptible to a Null Origin Attack. The problem is fixed in 0.21.27, 0.22.3, 0.23.2, and 1.0.0-M25. The original `CORS` implementation and `CORSConfig` are deprecated. See the GitHub GHSA for more information, including code examples and workarounds."
          },
          {
            "lang": "es",
            "value": "Http4s es una interfaz m\u00ednima e idiom\u00e1tica de Scala para servicios HTTP. En http4s versiones 0.21.26 y anteriores, 0.22.0 hasta 0.22.2, 0.23.0, 0.23.1, y 1.0.0-M1 hasta 1.0.0-M24, la configuraci\u00f3n CORS predeterminada es vulnerable a un ataque de reflexi\u00f3n de origen. El middleware tambi\u00e9n es susceptible a un ataque de Origen Nulo. El problema se ha corregido en las versiones 0.21.27, 0.22.3, 0.23.2 y 1.0.0-M25. La implementaci\u00f3n original de \"CORS\" y \"CORSConfig\" est\u00e1n obsoletas. Consulte el GHSA de GitHub para conseguir m\u00e1s informaci\u00f3n, incluyendo ejemplos de c\u00f3digo y soluciones"
          }
        ],
        "id": "CVE-2021-39185",
        "lastModified": "2024-11-21T06:18:49.873",
        "metrics": {
          "cvssMetricV2": [
            {
              "acInsufInfo": false,
              "baseSeverity": "MEDIUM",
              "cvssData": {
                "accessComplexity": "LOW",
                "accessVector": "NETWORK",
                "authentication": "NONE",
                "availabilityImpact": "NONE",
                "baseScore": 6.4,
                "confidentialityImpact": "PARTIAL",
                "integrityImpact": "PARTIAL",
                "vectorString": "AV:N/AC:L/Au:N/C:P/I:P/A:N",
                "version": "2.0"
              },
              "exploitabilityScore": 10.0,
              "impactScore": 4.9,
              "obtainAllPrivilege": false,
              "obtainOtherPrivilege": false,
              "obtainUserPrivilege": false,
              "source": "nvd@nist.gov",
              "type": "Primary",
              "userInteractionRequired": false
            }
          ],
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 9.1,
                "baseSeverity": "CRITICAL",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
                "version": "3.1"
              },
              "exploitabilityScore": 3.9,
              "impactScore": 5.2,
              "source": "security-advisories@github.com",
              "type": "Secondary"
            }
          ]
        },
        "published": "2021-09-01T20:15:07.447",
        "references": [
          {
            "source": "security-advisories@github.com",
            "tags": [
              "Third Party Advisory"
            ],
            "url": "https://github.com/http4s/http4s/releases/tag/v0.23.2"
          },
          {
            "source": "security-advisories@github.com",
            "tags": [
              "Patch",
              "Third Party Advisory"
            ],
            "url": "https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Third Party Advisory"
            ],
            "url": "https://github.com/http4s/http4s/releases/tag/v0.23.2"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch",
              "Third Party Advisory"
            ],
            "url": "https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6"
          }
        ],
        "sourceIdentifier": "security-advisories@github.com",
        "vulnStatus": "Modified",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-346"
              }
            ],
            "source": "security-advisories@github.com",
            "type": "Secondary"
          }
        ]
      }
    },
    "redhat_vex": {
      "current_release_date": "2026-03-27T13:39:46+00:00",
      "cve": "CVE-2021-39185",
      "id": "CVE-2021-39185",
      "initial_release_date": "2021-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "1",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "Default CORS config allows any origin with credentials",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-39185.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.