Skip to content

GHSA-mchx-7j67-8mcf CVE-2024-41657 GO-2024-3087

Casdoor CORS misconfiguration (GHSL-2024-035)

High Go
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.80%
Chance of exploitation in the next 30 days. Higher than 56.60% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-942 Permissive Cross-domain Security Policy with Untrusted Domains
Fix
None yet
No fixed version published

Description

Casdoor is a UI-first Identity and Access Management (IAM) / Single-Sign-On (SSO) platform. In Casdoor 1.577.0 and earlier, a logic vulnerability exists in the beego filter CorsFilter that allows any website to make cross domain requests to Casdoor as the logged in user. Due to the a logic error in checking only for a prefix when authenticating the Origin header, any domain can create a valid subdomain with a valid subdomain prefix (Ex: localhost.example.com), allowing the website to make requests to Casdoor as the current signed-in user.

Affected versions

Go

PackageVulnerableFixed in
github.com/casdoor/casdoor
<= 1.557.0
No fix yet
github.com/casdoor/casdoor
all versions
No fix yet

How to fix

No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
Passive
Confidentiality (vulnerable system)
High
Integrity (vulnerable system)
High
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 8.1

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Weakness

CWE-942: Permissive Cross-domain Security Policy with Untrusted Domains

The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate.

How to prevent it
  • Architecture and Design, Operation: Define a restrictive Content Security Policy [REF-1486] or cross-domain policy file.
  • Architecture and Design, Operation: Avoid using wildcards in the CSP / cross-domain policy file. Any domain matching the wildcard expression will be implicitly trusted, and can perform two-way interaction with the target server.
  • Architecture and Design, Operation: For Flash, modify crossdomain.xml to use meta-policy options such as 'master-only' or 'none' to reduce the possibility of an attacker planting extraneous cross-domain policy files on a server.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-mfvp-7p3v-x9mh
Casdoor SAML callback handler accepts any well-formed SAMLResponse sent to /api/acs without verifying that it corresponds to an AuthnRequest
Critical Also affects github.com/casdoor/casdoor
GHSA-339w-3hqm-9pjc
Casdoor doesn't verify that a JWT used for token exchange is still active
Critical Also affects github.com/casdoor/casdoor
GHSA-rgq2-93gj-ffxg
Casdoor doesn't enforce SAML assertion time bounds
High Also affects github.com/casdoor/casdoor
GHSA-c9w5-qp6m-m395
Casdoor: GetTokenExchangeToken bypass through lack of cross-organization JWT signature check
Critical Also affects github.com/casdoor/casdoor
GHSA-3w4h-g9f5-j84p
Casdoor does not validate the AudienceRestriction element in SAML assertions
Critical Also affects github.com/casdoor/casdoor
GHSA-gv4m-v8c8-hr3g
Casdoor allows users to bypass configured MFA requirements
Medium Also affects github.com/casdoor/casdoor
GHSA-fwgq-j9r9-qjgr
Casdoor has an authentication bypass
Critical Also affects github.com/casdoor/casdoor
GHSA-rmxx-v9rj-vpvg
Casdoor: Arbitrary file write possible through Local File System storage provider
Medium Also affects github.com/casdoor/casdoor
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor