5.3medium
ip-address: XSS in Address6 HTML-emitting methods
- Severity
- 5.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.47% (higher than 42% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-v2v4-37r5-5v8g
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| beaugunderson ip-address | < 10.1.1, before 10.1.1 | CVE List, NVD |
| ip-address | Not specified | CVE List |
| nodejs24 | Not specified Not affected: from 1:24.18.0-1.el10_2 before * | CVE List |
| nodejs22 | Not specified Not affected: from 1:22.23.1-2.el10_2 before *, from 1:22.23.1-2.el10_0 before * | CVE List |
| rh-podman-desktop | Not specified Not affected: from 0:1.1.2-1.el10_2 before * | CVE List |
| nodejs:24 | Not specified Not affected: from 8100020260630152626.6d880403 before *, from 9080020260626074955.rhel9 before * | CVE List |
| nodejs:22 | Not specified Not affected: from 8100020260703140402.6d880403 before *, from 9080020260626075442.rhel9 before *, from 9060020260804140259.rhel9 before * | CVE List |
| ansible-automation-platform-tech-preview/mcp-server-rhel9 | Not specified Not affected: from 1782721130 before * | CVE List |
| rhdh/rhdh-hub-rhel9 | Not specified Not affected: from 1783448184 before *, from 1782761244 before * | CVE List |
| rhelai3/disk-image-cuda-rhel9 | Not specified Not affected: from 1788290314 before * | CVE List |
| rhelai3/bootc-aws-cuda-rhel9 | Not specified Not affected: from 1788273908 before * | CVE List |
| rhelai3/bootc-azure-cuda-rhel9 | Not specified Not affected: from 1788273909 before * | CVE List |
| rhelai3/bootc-azure-rocm-rhel9 | Not specified Not affected: from 1788273908 before * | CVE List |
| rhelai3/bootc-cuda-rhel9 | Not specified Not affected: from 1788260684 before * | CVE List |
| rhelai3/bootc-gcp-cuda-rhel9 | Not specified Not affected: from 1788273977 before * | CVE List |
| rhelai3/bootc-rocm-rhel9 | Not specified Not affected: from 1788260620 before * | CVE List |
| rhmtc/openshift-migration-ui-rhel8 | Not specified Not affected: from 1783690532 before * | CVE List |
| rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9 | Not specified Not affected: from 1787801527 before *, from 1787121387 before * | CVE List |
| openshift4/ose-agent-installer-ui-rhel9 | Not specified Not affected: from 1784724699 before *, from 1784713741 before *, from 1784721581 before * | CVE List |
| odf4/cephcsi-rhel9 | Not specified Not affected: from 1787057250 before * | CVE List |
| odf4/cephcsi-rhel9-operator | Not specified Not affected: from 1787057964 before * | CVE List |
| odf4/devicefinder-rhel9 | Not specified Not affected: from 1787057603 before * | CVE List |
| odf4/mcg-core-rhel9 | Not specified Not affected: from 1787058450 before * | CVE List |
| odf4/mcg-rhel9-operator | Not specified Not affected: from 1787057989 before * | CVE List |
| odf4/ocs-client-console-rhel9 | Not specified Not affected: from 1787059853 before * | CVE List |
| odf4/ocs-client-rhel9-operator | Not specified Not affected: from 1787057849 before * | CVE List |
| odf4/ocs-metrics-exporter-rhel9 | Not specified Not affected: from 1787060257 before * | CVE List |
| odf4/ocs-rhel9-operator | Not specified Not affected: from 1787058278 before * | CVE List |
| odf4/odf-blackbox-exporter-rhel9 | Not specified Not affected: from 1787058658 before * | CVE List |
| odf4/odf-cli-rhel9 | Not specified Not affected: from 1787058706 before * | CVE List |
| odf4/odf-cloudnative-pg-rhel9-operator | Not specified Not affected: from 1787058403 before * | CVE List |
| odf4/odf-console-rhel9 | Not specified Not affected: from 1787059072 before * | CVE List |
| odf4/odf-cosi-sidecar-rhel9 | Not specified Not affected: from 1787058807 before * | CVE List |
| odf4/odf-csi-addons-rhel9-operator | Not specified Not affected: from 1787058588 before * | CVE List |
| odf4/odf-csi-addons-sidecar-rhel9 | Not specified Not affected: from 1787058970 before * | CVE List |
| odf4/odf-drbd-rhel9 | Not specified Not affected: from 1787059538 before * | CVE List |
| odf4/odf-external-snapshotter-rhel9-operator | Not specified Not affected: from 1787059616 before * | CVE List |
| odf4/odf-external-snapshotter-sidecar-rhel9 | Not specified Not affected: from 1787061098 before * | CVE List |
| odf4/odf-lightspeed-rag-content-rhel9 | Not specified Not affected: from 1787059085 before * | CVE List |
| odf4/odf-multicluster-console-rhel9 | Not specified Not affected: from 1787059621 before * | CVE List |
| odf4/odf-multicluster-rhel9-operator | Not specified Not affected: from 1787059386 before * | CVE List |
| odf4/odf-must-gather-rhel9 | Not specified Not affected: from 1787060080 before * | CVE List |
| odf4/odf-rhel9-operator | Not specified Not affected: from 1787060105 before * | CVE List |
| odf4/odr-rhel9-operator | Not specified Not affected: from 1787059493 before * | CVE List |
| odf4/odr-volsync-plugin-mover-rhel9 | Not specified Not affected: from 1787060201 before * | CVE List |
| odf4/odr-volsync-plugin-rhel9-operator | Not specified Not affected: from 1787060274 before * | CVE List |
| odf4/rook-ceph-rhel9-operator | Not specified Not affected: from 1787061554 before * | CVE List |
| devspaces/code-rhel9 | Not specified Not affected: from 1782498475 before * | CVE List |
| devspaces/dashboard-rhel9 | Not specified Not affected: from 1782498792 before * | CVE List |
| openshift-service-mesh/kiali-ossmc-rhel8 | Not specified Not affected: from 1781937133 before * | CVE List |
| openshift-service-mesh/kiali-rhel8 | Not specified Not affected: from 1782287580 before * | CVE List |
| openshift-service-mesh/kiali-ossmc-rhel9 | Not specified Not affected: from 1782201894 before *, from 1782201696 before *, from 1782201851 before *, from 1782231869 before * | CVE List |
| openshift-service-mesh/kiali-rhel9 | Not specified Not affected: from 1782201833 before *, from 1782201537 before *, from 1782201812 before *, from 1782201466 before * | CVE List |
| satellite/iop-remediations-rhel9 | Not specified Not affected: from 1786008041 before * | CVE List |
| openshift-sandboxed-containers/osc-pccs | Not specified | CVE List |
| cryostat/cryostat-openshift-console-plugin-rhel9 | Not specified | CVE List |
| cryostat-openshift-console-plugin-npm | Not specified | CVE List |
| exploit-intelligence-tech-preview/vulnerability-analysis-rhel9 | Not specified | CVE List |
| multicluster-engine/console-mce-rhel9 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-rhel8 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-rhel9 | Not specified | CVE List |
| rhacm2/console-rhel9 | Not specified | CVE List |
| rh-podman-desktop.git | Not specified | CVE List |
| rhdesktop/rh-podman-desktop-ext-sandbox-rhel10 | Not specified | CVE List |
| rust | Not specified | CVE List |
| rhelai3/bootc-gaudi-rhel9 | Not specified | CVE List |
| openshift4/ose-console-rhel9 | Not specified | CVE List |
| devspaces/openvsx-rhel9 | Not specified | CVE List |
| ansible-automation-platform/automation-portal | Not specified | CVE List |
| ip-address (npm) | before 10.1.1 | GitHub Advisory Database |
All scores
| GitHub_M | 5.3medium CVSS:4.0 | 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 |
| redhat-SADP | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
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. A related issue in v6.helpers.spanAll() produced malformed markup but was not exploitable; it is hardened in the same release for consistency.
Details
Four related issues were identified and fixed together:
Address6.group(): zone ID injection. TheAddress6constructor stores the raw input (including any IPv6 zone ID) inthis.addressbefore zone stripping.group()then passedthis.addresstohelpers.simpleGroup(), which wrapped each:-separated segment in a<span>element without HTML-escaping the content. A zone ID containing HTML markup was embedded verbatim.Address6.link({ prefix, className }): attribute-value injection.link()concatenated user-suppliedprefixandclassNameinto thehref="…"andclass="…"attributes without escaping. A caller passing untrusted content through these options could inject event handlers (e.g.onmouseover) and achieve XSS.Address6constructor: leading-zero IPv4 error path. The leading-zero branch inparse4in6()builtAddressError.parseMessageby concatenating the raw address throughString.replace(). Becauseparse4in6()runs before the bad-character check, any characters in the groups preceding the IPv4 suffix flowed into the error's HTML unescaped. Consumers who renderparseMessageas HTML (its documented purpose — it already contains<span class="parse-error">markup) could be XSS'd by a crafted input such as<img src=x onerror=alert(1)>:10.0.01.1.v6.helpers.spanAll(): attribute-value injection (defense in depth).spanAll()embedded each character of its input into aclass="digit value-${n} …"attribute without escaping. Becausesplit('')limitsnto a single character this was not exploitable in practice, but it produced malformed markup and is fixed for consistency.
Affected Versions
All versions up to and including 10.1.0.
Patched Version
10.1.1.
Impact
Real-world exposure is believed to be extremely limited. Analysis of all 425 dependent npm packages as well as GitHub code search found zero consumers of group(), link(), or spanAll(): these HTML-emitting surfaces appear to be unused across published npm packages and public repositories. Applications using only the address-parsing and comparison APIs (isValid, correctForm, isInSubnet, bigInt, etc.) are not affected.
Consumers who do render the output of group(), link(), spanAll(), or AddressError.parseMessage as HTML against untrusted input should upgrade.
PoC
const { Address6 } = require('ip-address');
const addr = new Address6('fe80::1%<img src=x onerror=alert(1)>');
document.body.innerHTML = addr.group(); // fires the onerror handler in 10.1.0
Workarounds
If users cannot upgrade immediately:
- Do not pass untrusted input to the
Address6constructor, or - Never render the output of
group(),link(), orspanAll(), nor theparseMessagefield of any thrownAddressError, as HTML; treat these values as text only, or run them through DOMPurify before inserting into the DOM (DOMPurify's default configuration preserves the library's intended<span>wrapping while stripping any injected event handlers), or - Validate input with
Address6.isValid()and reject anything that contains a zone identifier (a%character) or characters outside[0-9a-fA-F:/]before passing it to the constructor.
Lack of separate CVEs
Given the evidence that these methods are not used, and given that they are all of the same construction, maintainers do not think it's relevant or useful to create a separate CVE for each library method.
Credit
ip-address thanks @scovetta for reporting this issue.
NVD (es)
ip-address es una biblioteca para analizar y manipular direcciones IPv4 e IPv6 en JavaScript. Antes de 10.1.1, Address6.group() y Address6.link() no escapan a HTML el contenido controlado por el atacante antes de incrustarlo en las cadenas HTML que devuelven, y AddressError.parseMessage (emitido por el constructor de Address6 para entrada inválida) puede contener contenido controlado por el atacante sin escapar en una rama. Una aplicación que (1) pasa entrada no confiable a Address6 y (2) renderiza la salida de estos métodos, o el parseMessage del error lanzado, como HTML (p. ej., a través de innerHTML) es vulnerable a cross-site scripting. Esta vulnerabilidad está corregida en 10.1.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42338 changed 2026-09-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-v2v4-37r5-5v8g changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-42338 changed 2026-10-26 | Public domain |