CVE-2023-34103: Avo Cross-Site Scripting Vulnerability
HIGHCVE-2023-34103 is a HIGH (CVSS 7.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Avo libraries in the RubyGems ecosystem. The issue involves avo vulnerable to stored xss (cross site scripting) in html content based fields. Remediation is available by upgrading affected packages to version 2.33.3.
CVE-2023-34103 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2023-34103
To remediate this vulnerability, upgrade all affected Avo 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 avo to 2.33.3
Upgrade avo to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for avo
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-34103, inspect your project dependencies for Avo:
inspect dependencies for avo
Analyze the terminal output to locate any version of Avo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.33.3), 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 Avo, 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-34103 Affected Avo Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2023-34103?
Which Avo versions are affected?
What version fixes CVE-2023-34103?
Is avo affected?
What is the CVSS score of CVE-2023-34103?
What CWE is associated with CVE-2023-34103?
How can I check RubyGems dependencies for CVE-2023-34103?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5cr9-5jx3-2g39",
"modified" : "2024-06-25T16:56:41Z",
"published" : "2023-06-06T14:13:08Z",
"aliases" : [ "CVE-2023-34103" ],
"summary" : "avo vulnerable to Stored XSS (Cross Site Scripting) in html content based fields",
"details" : "### Summary\nSome avo fields are vulnerable to XSS when rendering html based content.\n\n### Details\nDuring the analysis of the web application, a rendered field was discovered that did not filter JS / HTML tags in a safe way and can be abused to execute js code on a client side. The trix field uses the trix editor in the backend to edit rich text data which basically operates with html tags. To display the stored data in a rendered view, the HasHTMLAttributes concern is used. This can be exploited by an attacker to store javascript code in any trix field by intercepting the request and modifying the post data, as the trix editor does not allow adding custom html or js tags on the frontend.\n\n### PoC\n\n_Adding javascript in the post request which is used when editing a \"post\" resource (body is declared as a trix field)_\n\n\n_Successful execution of JS code on live demo environment_\n\n### Impact\nUnlike non-persistent XSS, persistent XSS does not require a social engineering phase. Victims of this attack do not need to be tricked into clicking a link or something like that. However, by exploiting such a vulnerability on this particular target, attackers may be able to gain access to accounts that require special protection, such as administrators of the web service, which is what Avo is primarily intended to be used for.\n\n### Recommendation\nThe content of a field that contains html code should be sanitized using the according rails helper which uses a whitelist of known-safe tags and attributes. Also this security consideration should be applied to the “as_html” attribute as well because it may contain user controlled input as well.\n\nhttps://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "avo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.33.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.33.2"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "avo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0.pre1"
}, {
"last_affected" : "3.0.0.pre12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/avo-hq/avo/security/advisories/GHSA-5cr9-5jx3-2g39"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34103"
}, {
"type" : "WEB",
"url" : "https://github.com/avo-hq/avo/commit/7891c01e1fba9ca5d7dbccc43d27f385e5d08563"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/avo-hq/avo"
}, {
"type" : "WEB",
"url" : "https://github.com/avo-hq/avo/releases/tag/v2.33.3"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/avo/CVE-2023-34103.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-06T14:13:08Z",
"nvd_published_at" : "2023-06-05T23:15:12Z"
}
}