# CVE-2017-20058: Elefant CMS Version Comparison Persistent cross site scriting

> Persistent cross-site scripting in Elefant CMS allows remote attackers to inject malicious scripts, potentially leading to session hijacking or code execution.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Jun 2022
- **Updated:** 15 Apr 2025
- **Also known as:** GHSA-5hfm-g799-wjw6

## What is CVE-2017-20058?

CVE-2017-20058 is a medium-severity cross-site scripting vulnerability in Elefant CMS, published on 20 Jun 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A vulnerability classified as problematic was found in Elefant CMS 1.3.12-RC. Affected by this vulnerability is an unknown functionality of the component Version Comparison. The manipulation leads to basic cross site scripting (Persistent). The attack can be launched remotely. Upgrading to version 1.3.13 is able to address this issue. It is recommended to upgrade the affected component.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page)

## Which versions are affected by CVE-2017-20058?

2 open source packages ship an affected version, including elefant/cms. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `elefant/cms` | Packagist | All versions | 1.3.13 |
| `elefant/cms` | Packagist | All versions | 1.3.13 |

Products: Elefantcms Elefantcms.

## How do I fix CVE-2017-20058?

Upgrade elefant/cms to 1.3.13 or later.

## Is CVE-2017-20058 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-20058 exists.

## Other vulnerabilities in Elefant CMS

- [CVE-2018-15601](https://insights.sbomify.com/CVE-2018-15601/): Elefant CMS Improper Input Validation (critical 9.8)
- [CVE-2018-16387](https://insights.sbomify.com/CVE-2018-16387/): Elefant CMS CSRF Vulnerability (high 8.8)
- [CVE-2012-6521](https://insights.sbomify.com/CVE-2012-6521/): Cross-site scripting in n/a (medium 4.3)
- [CVE-2012-1296](https://insights.sbomify.com/CVE-2012-1296/): Elefant CMS Multiple XSS Vulnerabilities (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-20058 and fix it if it is affected.

What it is: CVE-2017-20058 is a medium-severity cross-site scripting vulnerability in Elefant CMS, published on 20 Jun 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-20058 exists.

Affected packages and fixed versions:
- elefant/cms (Packagist): affected all versions; fixed in 1.3.13
- elefant/cms (Packagist): affected all versions; fixed in 1.3.13

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-20058/ (Markdown: https://insights.sbomify.com/CVE-2017-20058/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-20058
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-20058
- OSV: https://osv.dev/vulnerability/CVE-2017-20058

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-20058/
Summaries are generated and may contain mistakes; the official description above is the record.
