security: update dependency ip-address to v10.7.4 [SECURITY] (release/1.9) #89

Merged
ff-admin-bot merged 1 commit from renovate/release/1.9-npm-ip-address-vulnerability into release/1.9 2026-10-28 12:04:14 +00:00
Member

This PR contains the following updates:

Package Change Age Confidence
ip-address 10.7.3 → 10.7.4 age confidence

ip-address: Address6 matches a zone identifier in quadratic time ahead of its length limit, allowing a single long string to stall the process

CVE-2026-111997 / GHSA-rxp7-6hxx-x8q5

More information

Details

Summary

new Address6() and Address6.isValid() strip a zone identifier with the pattern /%.*$/ before they apply the 45-character length limit. When the string holds many % characters followed by a line terminator, the pattern is retried from every % and each attempt scans to the line terminator before failing, so rejecting the string takes time proportional to the square of its length. 10,000 % characters and a newline take 41 ms, 40,000 take 632 ms and 100,000 take 3.9 s of synchronous work. The same strings without the newline are rejected in under a millisecond.

An application that validates an attacker-supplied string with these methods can be stalled by a single long request. The input is rejected with the correct AddressError; the cost of reaching that rejection is the defect.

Details

The constructor in src/ipv6.ts removes the CIDR suffix, then the zone, then checks the length of what is left:

const zone = constants6.RE_ZONE_STRING.exec(address);

if (zone) {
  this.zone = zone[0];

  address = address.replace(constants6.RE_ZONE_STRING, '');
}

const longest = this.groups * 5 + 5;

if (address.length > longest) {
  throw new AddressError(`IPv6 addresses are at most ${longest} characters.`);
}

RE_ZONE_STRING is /%.*$/. It has no anchor at its start, . does not match a line terminator (\n, \r, U+2028 or U+2029), and without the m flag $ matches only at the end of the input. For % repeated N times and then \n, the engine starts a match at the first %, .* consumes the remaining % characters up to the newline, $ fails there, and backtracking through every shorter .* fails too. The engine then starts again at the second %, and so on: N starts, each proportional to N. The length limit that follows rejects the string in constant time, after the scan has already run.

The line terminator need not be last. Any string in which many % characters precede a line terminator behaves the same way.

Every entry point that passes a caller's string to the Address6 constructor is affected: new Address6(), isValid(), both arguments of fromAddressAndMask() and fromAddressAndWildcardMask(), and the prefix argument of fromAddress4Nat64() and toAddress4Nat64(). fromWildcard() rejects a % before it constructs anything, fromURL() admits only hex digits, colons and dots in a host, and fromArpa() checks the nibble grammar first, so those three are unaffected. Address4 has no zone and is unaffected.

Affected versions

<= 10.7.3. The zone pattern has been in the constructor since 1.0.0; 5.9.4, 9.0.5 and 10.7.0 show the same timings as 10.7.3.

Impact

Address6.isValid() on N % characters and a newline, measured on ip-address 10.7.3 and node 24.21.0:

Input Wall time Same length of !
5,461 characters 13 ms 0.1 ms
16 KiB 108 ms 0.1 ms
100 KB 3.9 s 0.1 ms
256 KiB 27 s 0.2 ms

The parse is synchronous, so the event loop is blocked for the whole of the wall time and nothing else on that process is served. No memory is retained and the process resumes when the call returns.

Reachability

The input needs a line terminator after the % characters, which decides where it can arrive. An HTTP header value cannot carry a carriage return or a line feed, so a host or address taken from a header does not reach this. A URL can carry both characters percent-encoded at three bytes each, and Node's default 16 KB limit on the request line and headers admits about 5,461 of them: 13 ms. A request body is where the larger sizes come from. Common body parsers default to between 100 KB and 1 MB, and at 100 KB one field passed to the parser unchecked blocks the process for 3.9 s.

Proof of concept

npm i ip-address@10.7.3, then:

const { Address6 } = require('ip-address');

function time(input) {
  const start = process.hrtime.bigint();

  Address6.isValid(input);

  return `${(Number(process.hrtime.bigint() - start) / 1e6).toFixed(1)} ms`;
}

for (const n of [10000, 20000, 40000, 100000]) {
  console.log(`${n}: ${time(`${'%'.repeat(n)}\n`)}, without the newline ${time('%'.repeat(n))}`);
}

On affected versions (node 24.21.0):

10000: 41.0 ms, without the newline 0.0 ms
20000: 161.1 ms, without the newline 0.0 ms
40000: 632.4 ms, without the newline 0.1 ms
100000: 3899.8 ms, without the newline 0.1 ms

Each doubling of the input multiplies the time by four.

Remediation

Upgrade to the patched release. In the fix, the constructor finds the zone by the index of the first % and accepts the remainder as a zone only when it holds no line terminator, which reads the input once. 1 MiB of the input above is rejected in about a millisecond. Every address that parsed before parses to the same result, and a string with a line terminator after a % is rejected as it was.

RE_ZONE_STRING stays exported from v6/constants for code that imports it directly and is marked @deprecated; the library itself does not call it.

If you cannot upgrade immediately, reject a candidate longer than an address with a zone identifier can be before you parse it:

if (host.length > 64) throw new Error('not an IP address');

Severity

  • CVSS Score: 6.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

beaugunderson/ip-address (ip-address)

v10.7.4

Compare Source

Full Changelog: https://github.com/beaugunderson/ip-address/compare/v10.7.3...v10.7.4


Configuration

📅 Schedule: (in timezone Europe/Berlin)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [ip-address](https://github.com/beaugunderson/ip-address) | [`10.7.3` → `10.7.4`](https://renovatebot.com/diffs/npm/ip-address/10.7.3/10.7.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/ip-address/10.7.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ip-address/10.7.3/10.7.4?slim=true) | --- ### ip-address: Address6 matches a zone identifier in quadratic time ahead of its length limit, allowing a single long string to stall the process [CVE-2026-111997](https://nvd.nist.gov/vuln/detail/CVE-2026-111997) / [GHSA-rxp7-6hxx-x8q5](https://github.com/advisories/GHSA-rxp7-6hxx-x8q5) <details> <summary>More information</summary> #### Details ##### Summary `new Address6()` and `Address6.isValid()` strip a zone identifier with the pattern `/%.*$/` before they apply the 45-character length limit. When the string holds many `%` characters followed by a line terminator, the pattern is retried from every `%` and each attempt scans to the line terminator before failing, so rejecting the string takes time proportional to the square of its length. 10,000 `%` characters and a newline take 41 ms, 40,000 take 632 ms and 100,000 take 3.9 s of synchronous work. The same strings without the newline are rejected in under a millisecond. An application that validates an attacker-supplied string with these methods can be stalled by a single long request. The input is rejected with the correct `AddressError`; the cost of reaching that rejection is the defect. ##### Details The constructor in `src/ipv6.ts` removes the CIDR suffix, then the zone, then checks the length of what is left: ```ts const zone = constants6.RE_ZONE_STRING.exec(address); if (zone) { this.zone = zone[0]; address = address.replace(constants6.RE_ZONE_STRING, ''); } const longest = this.groups * 5 + 5; if (address.length > longest) { throw new AddressError(`IPv6 addresses are at most ${longest} characters.`); } ``` `RE_ZONE_STRING` is `/%.*$/`. It has no anchor at its start, `.` does not match a line terminator (`\n`, `\r`, U+2028 or U+2029), and without the `m` flag `$` matches only at the end of the input. For `%` repeated N times and then `\n`, the engine starts a match at the first `%`, `.*` consumes the remaining `%` characters up to the newline, `$` fails there, and backtracking through every shorter `.*` fails too. The engine then starts again at the second `%`, and so on: N starts, each proportional to N. The length limit that follows rejects the string in constant time, after the scan has already run. The line terminator need not be last. Any string in which many `%` characters precede a line terminator behaves the same way. Every entry point that passes a caller's string to the `Address6` constructor is affected: `new Address6()`, `isValid()`, both arguments of `fromAddressAndMask()` and `fromAddressAndWildcardMask()`, and the prefix argument of `fromAddress4Nat64()` and `toAddress4Nat64()`. `fromWildcard()` rejects a `%` before it constructs anything, `fromURL()` admits only hex digits, colons and dots in a host, and `fromArpa()` checks the nibble grammar first, so those three are unaffected. `Address4` has no zone and is unaffected. ##### Affected versions `<= 10.7.3`. The zone pattern has been in the constructor since 1.0.0; 5.9.4, 9.0.5 and 10.7.0 show the same timings as 10.7.3. ##### Impact `Address6.isValid()` on N `%` characters and a newline, measured on ip-address 10.7.3 and node 24.21.0: | Input | Wall time | Same length of `!` | |---|---|---| | 5,461 characters | 13 ms | 0.1 ms | | 16 KiB | 108 ms | 0.1 ms | | 100 KB | 3.9 s | 0.1 ms | | 256 KiB | 27 s | 0.2 ms | The parse is synchronous, so the event loop is blocked for the whole of the wall time and nothing else on that process is served. No memory is retained and the process resumes when the call returns. ##### Reachability The input needs a line terminator after the `%` characters, which decides where it can arrive. An HTTP header value cannot carry a carriage return or a line feed, so a host or address taken from a header does not reach this. A URL can carry both characters percent-encoded at three bytes each, and Node's default 16 KB limit on the request line and headers admits about 5,461 of them: 13 ms. A request body is where the larger sizes come from. Common body parsers default to between 100 KB and 1 MB, and at 100 KB one field passed to the parser unchecked blocks the process for 3.9 s. ##### Proof of concept `npm i ip-address@10.7.3`, then: ```js const { Address6 } = require('ip-address'); function time(input) { const start = process.hrtime.bigint(); Address6.isValid(input); return `${(Number(process.hrtime.bigint() - start) / 1e6).toFixed(1)} ms`; } for (const n of [10000, 20000, 40000, 100000]) { console.log(`${n}: ${time(`${'%'.repeat(n)}\n`)}, without the newline ${time('%'.repeat(n))}`); } ``` On affected versions (node 24.21.0): ``` 10000: 41.0 ms, without the newline 0.0 ms 20000: 161.1 ms, without the newline 0.0 ms 40000: 632.4 ms, without the newline 0.1 ms 100000: 3899.8 ms, without the newline 0.1 ms ``` Each doubling of the input multiplies the time by four. ##### Remediation Upgrade to the patched release. In the fix, the constructor finds the zone by the index of the first `%` and accepts the remainder as a zone only when it holds no line terminator, which reads the input once. 1 MiB of the input above is rejected in about a millisecond. Every address that parsed before parses to the same result, and a string with a line terminator after a `%` is rejected as it was. `RE_ZONE_STRING` stays exported from `v6/constants` for code that imports it directly and is marked `@deprecated`; the library itself does not call it. If you cannot upgrade immediately, reject a candidate longer than an address with a zone identifier can be before you parse it: ```js if (host.length > 64) throw new Error('not an IP address'); ``` #### Severity - CVSS Score: 6.3 / 10 (Medium) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N` #### References - [https://github.com/beaugunderson/ip-address/security/advisories/GHSA-rxp7-6hxx-x8q5](https://github.com/beaugunderson/ip-address/security/advisories/GHSA-rxp7-6hxx-x8q5) - [https://nvd.nist.gov/vuln/detail/CVE-2026-111997](https://nvd.nist.gov/vuln/detail/CVE-2026-111997) - [https://github.com/beaugunderson/ip-address/commit/ec80fcd5d7b97defecfd39717d782a9f9f8b89dd](https://github.com/beaugunderson/ip-address/commit/ec80fcd5d7b97defecfd39717d782a9f9f8b89dd) - [https://github.com/beaugunderson/ip-address](https://github.com/beaugunderson/ip-address) - [https://github.com/beaugunderson/ip-address/releases/tag/v10.7.4](https://github.com/beaugunderson/ip-address/releases/tag/v10.7.4) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-rxp7-6hxx-x8q5) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>beaugunderson/ip-address (ip-address)</summary> ### [`v10.7.4`](https://github.com/beaugunderson/ip-address/releases/tag/v10.7.4) [Compare Source](https://github.com/beaugunderson/ip-address/compare/v10.7.3...v10.7.4) **Full Changelog**: <https://github.com/beaugunderson/ip-address/compare/v10.7.3...v10.7.4> </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Berlin) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoicmVsZWFzZS8xLjkiLCJsYWJlbHMiOlsic2VjdXJpdHkiXX0=-->
security: update dependency ip-address to v10.7.4 [SECURITY]
All checks were successful
Build-Check / Lint (pull_request) Successful in 3m14s
Build-Check / Build (pull_request) Successful in 3m13s
Build-Check / Status im Pull Request (pull_request) Successful in 3m5s
e77141c3b3
ff-admin-bot scheduled this pull request to auto merge when all checks succeed 2026-10-28 11:57:51 +00:00
ff-admin-bot merged commit faca39a9eb into release/1.9 2026-10-28 12:04:14 +00:00
ff-admin-bot deleted branch renovate/release/1.9-npm-ip-address-vulnerability 2026-10-28 12:04:14 +00:00

✅ CI-Prüfung

Prüfung Ergebnis
Lint ✅ bestanden
Build ✅ bestanden

Details und Logs: CI-Lauf

<!-- ci-status --> ### ✅ CI-Prüfung | Prüfung | Ergebnis | |---|---| | Lint | ✅ bestanden | | Build | ✅ bestanden | Details und Logs: [CI-Lauf](https://code.jk-effects.cloud/FF-Admin/ff-admin-core-server/actions/runs/923)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
FF-Admin/ff-admin-core-server!89
No description provided.