CVE-2023-45683: Github.com/crewjam/saml Cross-Site Scripting Vulnerability
HIGHCVE-2023-45683 is a HIGH (CVSS 7.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/crewjam/saml libraries in the Go ecosystem. The issue involves cross-site scripting via missing binding syntax validation. Remediation is available by upgrading affected packages to version 0.4.14.
CVE-2023-45683 at a Glance
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).
How to Fix CVE-2023-45683
To remediate this vulnerability, upgrade all affected Github.com/crewjam/saml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/crewjam/saml to 0.4.14
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/crewjam/saml
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-45683, inspect your project dependencies for Github.com/crewjam/saml:
inspect dependencies for github.com/crewjam/saml
Analyze the terminal output to locate any version of Github.com/crewjam/saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.14), 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 Github.com/crewjam/saml, 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
CVE-2023-45683 Affected Github.com/crewjam/saml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/crewjam/saml
|
Go |
< 0.4.14
|
0.4.14
|
References
Frequently Asked Questions
What is CVE-2023-45683?
Which Github.com/crewjam/saml versions are affected?
What version fixes CVE-2023-45683?
Is github.com/crewjam/saml affected?
What is the CVSS score of CVE-2023-45683?
What CWE is associated with CVE-2023-45683?
How can I check Go dependencies for CVE-2023-45683?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-267v-3v32-g6q5",
"modified" : "2023-10-24T18:32:14Z",
"published" : "2023-10-17T14:20:59Z",
"aliases" : [ "CVE-2023-45683" ],
"summary" : "Cross-site Scripting via missing Binding syntax validation",
"details" : "### Impact\n\nThe package does not validate the ACS Location URI according to the SAML binding being parsed.\n\nIf abused, this flaw allows attackers to register malicious Service Providers at the IdP and inject Javascript in the ACS endpoint definition, achieving Cross-Site-Scripting (XSS) in the IdP context during the redirection at the end of a SAML SSO Flow.\n\nConsequently, an attacker may perform any authenticated action as the victim once the victim’s browser loaded the SAML IdP initiated SSO link for the malicious service provider.\n\nNote: The severity is considered “High” because the SP registration is commonly an unrestricted operation in IdPs, hence not requiring particular permissions or publicly accessible to ease the IdP interoperability.\n\n### Patches\n\nThis issue is fixed in 0.4.14\n\n### Workarounds\n\nUsers of the package can perform external validation of URLs provided in SAML metadata, or restrict the ability for end-users to upload arbitrary metadata. \n\n### References\n\nThis issue was reported by Francesco Lacerenza from Doyensec.\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" : "Go",
"name" : "github.com/crewjam/saml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/crewjam/saml/security/advisories/GHSA-267v-3v32-g6q5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45683"
}, {
"type" : "WEB",
"url" : "https://github.com/crewjam/saml/commit/b07b16cf83c4171d16da4d85608cb827f183cd79"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/crewjam/saml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-17T14:20:59Z",
"nvd_published_at" : "2023-10-16T19:15:11Z"
}
}