# CVE-2018-25053: moappi Json2html json2html.js cross site scripting


- **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
- **Fix available:** Yes
- **Published:** 28 Dec 2022
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-79mp-cxp4-9p6r

## What is CVE-2018-25053?

CVE-2018-25053 is a medium-severity vulnerability in moappi Json2html, published on 28 Dec 2022. 

### Official description

A vulnerability was found in moappi Json2html up to 1.1.x and classified as problematic. This issue affects some unknown processing of the file json2html.js. The manipulation leads to cross site scripting. The attack may be initiated remotely. Upgrading to version 1.2.0 is able to address this issue. The name of the patch is 2d3d24d971b19a8ed1fb823596300b9835d55801. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216959.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2018-25053?

2 open source packages ship an affected version, including node-json2html. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node-json2html` | npm | All versions | 1.2.0 |
| `node-json2html` | npm | All versions | 1.2.0 |

Products: Json2html Json2html.

## How do I fix CVE-2018-25053?

Upgrade node-json2html to 1.2.0 or later.

## Is CVE-2018-25053 being exploited?

There is no known exploitation of CVE-2018-25053 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-25053 and fix it if it is affected.

What it is: CVE-2018-25053 is a medium-severity vulnerability in moappi Json2html, published on 28 Dec 2022. 
Exploitation: There is no known exploitation of CVE-2018-25053 in the wild and no public exploit code.

Affected packages and fixed versions:
- node-json2html (npm): affected all versions; fixed in 1.2.0
- node-json2html (npm): affected all versions; fixed in 1.2.0

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-2018-25053/ (Markdown: https://insights.sbomify.com/CVE-2018-25053/index.md)
```

## Sources

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

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