# CVE-2026-42338: ip-address: XSS in Address6 HTML-emitting methods

> Attackers can execute arbitrary scripts in victim browsers if applications render unescaped IPv6 address data from this library as HTML.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA: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:** 12 May 2026
- **Updated:** 11 Sep 2026
- **Also known as:** CLEANSTART-2026-JW65236, CLEANSTART-2026-UV41499, CLEANSTART-2026-WK56892, CLEANSTART-2026-WX98104, CLSA-2026-1782694761, CLSA-2026-1790006158, CLSA-2026-1792776533, DEBIAN-CVE-2026-42338, ECHO-f113-cab6-59eb, GHSA-v2v4-37r5-5v8g, MINI-2r6p-r353-4pv4, MINI-2vcq-78gf-pjcv, MINI-2wq3-6wwx-qg7m, MINI-43v8-hchm-7p5h, MINI-486c-c7gp-v648, MINI-4ggp-4g2x-6p66, MINI-54x7-2786-7jv7, MINI-5653-m3fx-xc99, MINI-59rq-rqgw-pxc7, MINI-6vm8-px2j-5hf7, MINI-8vv6-598p-5wq4, MINI-95v4-j858-gxmx, MINI-9j9p-qhh8-f5mr, MINI-cgrw-5mc2-m3g6, MINI-f38c-c8pw-6v7w, MINI-f3mc-7cr4-h8qv, MINI-f434-mwfx-rc67, MINI-f7r6-66r9-m748, MINI-g49c-2v7j-32mq, MINI-gmg5-p3fw-mpc5, MINI-h573-p4q3-r284, MINI-hpj7-q63c-4rfj, MINI-jgvr-73c3-wr98, MINI-jhg8-7hjm-x7mv, MINI-mp4v-cm36-ggrj, MINI-mq2c-xp56-qmw5, MINI-p94f-xfqw-wqcp, MINI-pm47-3g7x-54hq, MINI-pmrc-vv57-4mgq, MINI-qfgp-93pp-8m53, MINI-r4r5-rf49-r75j, MINI-r4vp-m8m2-qrmj, MINI-rm3r-pc5g-j5g9, MINI-rq82-jg65-h4wc, MINI-vm6q-prmg-96rc, MINI-vq2v-v885-43mc, MINI-w6qj-x25x-cxpm, ROOT-APP-NPM-CVE-2026-42338, UBUNTU-CVE-2026-42338

## What is CVE-2026-42338?

CVE-2026-42338 is a medium-severity cross-site scripting vulnerability in beaugunderson ip-address, published on 12 May 2026. 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

ip-address is a library for parsing and manipulating IPv4 and IPv6 addresses in JavaScript. Prior to 10.1.1, Address6.group() and Address6.link() do not HTML-escape attacker-controlled content before embedding it in the HTML strings they return, and AddressError.parseMessage (emitted by the Address6 constructor for invalid input) can contain unescaped attacker-controlled content in one branch. An application that (1) passes untrusted input to Address6 and (2) renders the output of these methods, or the thrown error's parseMessage, as HTML (e.g. via innerHTML) is vulnerable to cross-site scripting. This vulnerability is fixed in 10.1.1.

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

## Which versions are affected by CVE-2026-42338?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ip-address` | npm | All versions | 10.1.1 |
| `ip-address` | npm | All versions | 10.1.1 |

Products: Beaugunderson Ip-Address.

## How do I fix CVE-2026-42338?

Upgrade ip-address to 10.1.1 or later.

## Is CVE-2026-42338 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42338 and fix it if it is affected.

What it is: CVE-2026-42338 is a medium-severity cross-site scripting vulnerability in beaugunderson ip-address, published on 12 May 2026. 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-2026-42338 exists.

Affected packages and fixed versions:
- ip-address (npm): affected all versions; fixed in 10.1.1
- ip-address (npm): affected all versions; fixed in 10.1.1

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

## Sources

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

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