CVE-2022-4022: WordPress SVG Support - Stored XSS
- Cve: CVE-2022-4022
- Name: WordPress SVG Support - Stored XSS
- Description: The SVG Support plugin for WordPress defaults to insecure settings in version 2.5 and 2.5.1. SVG files containing malicious javascript are not sanitized. While version 2.5 adds the ability to sanitize image as they are uploaded, the plugin defaults to disable sanitization and does not restrict SVG upload to only administrators. This allows authenticated attackers, with author-level privileges and higher, to upload malicious SVG files that can be embedded in posts and pages by higher privileged users. Additionally, the embedded JavaScript is also triggered on visiting the image URL, which allows an attacker to execute malicious code in browsers visiting that URL.
- Impact: Authenticated attackers can upload malicious SVGs that execute JavaScript, leading to potential cross-site scripting and malicious code execution in browsers.
- Remediation: Update to the latest version where sanitization defaults are secure or manually enable sanitization and restrict SVG uploads to administrators.
- Vulnerability type: stored_xss
- Vulnerability impact: client_script_exec
- Requirement type: logged_in
- Requirements: Attacker needs author privileges or higher to upload SVG files
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.4
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Epss score: 0.00552
- Epss percentile: 0.47
- Assignee: [email protected]
- Published at: 2022-11-16T14:15:11Z
- Age in days: 1469
- Modified at: 2026-06-17T05:19:46Z
- Patch available: yes
- References total: 2
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-4022
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation |
References
| Url | Source | Tags |
|---|---|---|
| https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=2776612%40svg-support%2Ftrunk&old=2672900%40svg-support%2Ftrunk&sfp_email=&sfph_mail= | nvd | Patch, Third Party Advisory |
| https://www.wordfence.com/vulnerability-advisories-continued/#CVE-2022-4022 | nvd | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| benbodhi:svg_support | >= 2.5.0, < 2.5.2 | no | nvd | /v1/products/benbodhi/svg_support |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts