Categories
CVE-2026-42338 medium CVSS 6.1

Cross-Site Scripting (XSS) in ip-address (CVE-2026-42338)

Summary

Cross-site scripting in ip-address (CVE-2026-42338). Risk of unauthorized operations or information disclosure. Exploitable via AddressError.parseMessage. Mitigation: upgrade to 10.1.1 or later.

Original description

The description as published by the source.

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:

  1. Address6.group(): zone ID injection. The Address6 constructor stores the raw input (including any IPv6 zone ID) in this.address before zone stripping. group() then passed this.address to helpers.simpleGroup(), which wrapped each :-separated segment in a `` element without HTML-escaping the content. A zone ID containing HTML markup was embedded verbatim.
  2. Address6.link({ prefix, className }): attribute-value injection. link() concatenated user-supplied prefix and className into the href="…" and class="…" attributes without escaping. A caller passing untrusted content through these options could inject event handlers (e.g. onmouseover) and achieve XSS.
  3. Address6 constructor: leading-zero IPv4 error path.…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-42338 has been found in ip-address.
Attackers can target a specific entry point like AddressError.parseMessage over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.1/10.
What to do: upgrade ip-address to 10.1.1 or later.
If unsure, ask your IT team or search "ip-address CVE-2026-42338" on the vendor's site.

CVE-2026-42338 (ip-address) — CWE-79 / CVSS v3 6.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: AddressError.parseMessage / Address6 / parseMessage / innerHTML
Patched: 10.1.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Cross-site scripting (XSS) (CWE-79) exists in ip-address. Attackers reach the vulnerable code path via AddressError.parseMessage without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of ip-address. Attack surface: AddressError.parseMessage / Address6 / parseMessage / innerHTML.

🔥 Severity

Severity: Medium (CVSS 6.1/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 10.1.1.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'ip-address' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'ip-address' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で ip-address を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade ip-address to 10.1.1

    ステージング環境で 10.1.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm ip-address
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"10.1.1"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details