Dec 1, 2026·10 min read·4 visits
Addressable versions 2.0.0 through 2.9.2 fail to enforce RFC 3454 bidirectional character rules in the pure-Ruby IDNA backend. This allows attackers to construct Punycode domain labels that visually reorder across dot separators in left-to-right displays, causing two distinct domains to render identically via display_uri.
CVE-2026-141530 is a user interface misrepresentation vulnerability in the pure-Ruby Internationalized Domain Names in Applications (IDNA) implementation of the Addressable gem (versions 2.0.0 through 2.9.2). The library omits enforcement of the RFC 3454 Section 6 bidirectional rule when converting between Punycode A-labels and Unicode U-labels. Consequently, calling Addressable::IDNA.to_unicode or Addressable::URI#display_uri decodes malformed Punycode labels containing mixed directional categories and trailing digits. When rendered in a standard left-to-right display context, the Unicode Bidirectional Algorithm visually reorders digits across domain label separators, enabling an attacker controlling a complementary domain to spoof a target hostname.
Addressable is a widely deployed Ruby gem that serves as a replacement for the standard library URI implementation. It provides extensive support for Uniform Resource Identifiers (URIs), Internationalized Resource Identifiers (IRIs), and Internationalized Domain Names in Applications (IDNA). To process internationalized domain names, Addressable supports two backends: a native C binding to GNU libidn via the idn-ruby gem, and a fallback pure-Ruby implementation located in Addressable::IDNA::Pure. In the majority of standard Ruby deployments where idn-ruby is not explicitly included in the bundle, Addressable defaults to the pure-Ruby backend.
In versions 2.0.0 through 2.9.2, the pure-Ruby IDNA implementation fails to enforce the Stringprep bidirectional validation rule specified in RFC 3454 Section 6 and RFC 3491 (Nameprep). This vulnerability is tracked as CVE-2026-141530 (GHSA-fccw-gx6q-mh6c) and is classified under CWE-451 (User Interface Misrepresentation of Critical Information) and CWE-1007 (Insufficient Visual Distinction of Homoglyphs Presented to User). The native idn-ruby backend is unaffected because the underlying libidn C library enforces the RFC 3454 rules natively.
Because the pure-Ruby parser skips bidirectional checks during both Addressable::IDNA.to_ascii and Addressable::IDNA.to_unicode operations, it decodes invalid Punycode ASCII-Compatible Encoding (ACE) labels—prefixed with xn--—into raw Unicode strings. These resulting strings can mix right-to-left (RTL) characters with numeric digits at label boundaries. When an application invokes Addressable::URI#display_uri to present a human-readable IRI to an end user, the invalid label is converted to Unicode rather than being retained in its safe ASCII Punycode form.
When this output is rendered in a standard left-to-right (LTR) user interface such as a terminal, web page, or email client, the Unicode Bidirectional Algorithm (UBA) reorders the characters for visual display. Digits positioned adjacent to neutral label separators (.) and RTL text segments can visually shift across the dot separator. This behavior allows an attacker who controls a complementary parent domain to craft a hostname that renders identically to a legitimate target domain.
The root cause of CVE-2026-141530 is the omission of RFC 3454 Section 6 bidirectional category validation in lib/addressable/idna/pure.rb. Under the IDNA2003 specification (RFC 3490 and RFC 3491), converting a domain label between ASCII and Unicode requires running the Nameprep profile of Stringprep. Section 6 of RFC 3454 defines strict invariants for any string containing right-to-left characters to ensure that bidirectional rendering algorithms do not introduce visual ambiguity across label boundaries.
Specifically, RFC 3454 categorizes bidirectional characters using two primary lookup tables: Table D.1, which defines characters with bidirectional categories R (Right-to-Left) or AL (Arabic Letter), and Table D.2, which defines characters with bidirectional category L (Left-to-Right). The specification mandates three validation conditions for any individual domain label:
The third requirement prevents European numbers (bidirectional category EN) or Arabic numbers (AN) from occupying the leading or trailing position of an RTL label. Under the Unicode Bidirectional Algorithm (UAX #9), the full stop character (., U+002E) used to separate domain labels has the bidirectional category CS (Common Number Separator). When a label containing RTL text begins or ends with a digit, and that digit is separated by a . from another label containing digits, the UBA treats the dot and the flanking digits as a single contiguous numeric expression.
In Addressable::IDNA::Pure, the to_unicode method decoded the Punycode payload and verified basic formatting and normalization constraints, but performed no checks against Tables D.1 or D.2. Consequently, a label like xn--1-3mcxl0f—which decodes to the digit 1 followed by the Arabic word شركة (meaning "company")—was accepted as a valid Unicode U-label. Because the label starts with the character 1 (which is not in Table D.1), it violates RFC 3454 Section 6 and must be rejected during to_ascii or left as an unrendered xn-- A-label during to_unicode.
In versions of Addressable prior to 2.10.0, lib/addressable/idna/pure.rb handled the conversion of domain names by splitting the input string on the . separator and processing each label independently. In to_unicode, each label beginning with the ACE_PREFIX (xn--) was passed to punycode_decode. After decoding, the implementation checked whether the decoded string re-encoded cleanly to the exact same Punycode string and checked that it did not decode to an embedded dot, but it lacked bidirectional character class definitions.
Commit f44193750649a2e05f3971b46b19e9a3f19d35d7 resolves this issue by introducing compiled regular expressions representing RFC 3454 Table D.1 (RAND_AL_CAT) and Table D.2 (L_CAT), along with a validation helper method bidi_rule_broken?.
# Patch in lib/addressable/idna/pure.rb (Commit f44193750649a2e05f3971b46b19e9a3f19d35d7)
# Table D.1 from RFC 3454 (bidirectional categories R and AL)
RAND_AL_CAT = /[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B...]/
# Table D.2 from RFC 3454 (bidirectional category L)
L_CAT = /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA...]/
# Enforces RFC 3454 Section 6 bidirectional rules on a single label.
def self.bidi_rule_broken?(label)
# Rule only applies if the label contains at least one R or AL character.
return false unless label =~ RAND_AL_CAT
# Violation if label contains any L character, or if the first or last
# character is not an R/AL character.
label =~ L_CAT || label[0] !~ RAND_AL_CAT || label[-1] !~ RAND_AL_CAT
end
private_class_method :bidi_rule_broken?The patch integrates bidi_rule_broken? into both the encoding (to_ascii) and decoding (to_unicode) pathways. In to_ascii, if a label fails the bidirectional check after Unicode NFKC normalization, Addressable::IDNA::Pure raises an InvalidLabel exception, which causes Addressable::URI#normalize to retain the hostname in percent-encoded format rather than generating prohibited Punycode.
# Updated decoding logic in Addressable::IDNA::Pure.to_unicode
def self.to_unicode(value)
# ...
parts.map do |part|
if part =~ /^#{ACE_PREFIX}/i
begin
decoded = punycode_decode(part[ACE_PREFIX.length..-1])
rescue PunycodeBadInput, PunycodeBigOutput, PunycodeOverflow
next part
end
# If the decoded label contains a label separator, fails round-trip
# validation, or violates the RFC 3454 bidi rule, retain the ASCII A-label.
if decoded =~ /[.。.。]/ ||
bidi_rule_broken?(decoded) ||
lookup_unicode_lowercase(part) != to_ascii(decoded)
part
else
decoded
end
else
part
end
end.join('.')
endIn addition to the bidirectional check, commit f44193750649a2e05f3971b46b19e9a3f19d35d7 also updates the label separator guard (decoded =~ /[.。.。]/) to include the IDNA2003 alternative dot equivalents (U+3002, U+FF0E, U+FF61). This prevents labels that decode into alternative label separators from spoofing subdomain boundaries when rendered via to_unicode.
The fix completely addresses the RFC 3454 Section 6 requirement for IDNA2003 compliance within the pure-Ruby implementation. It should be noted that Addressable implements IDNA2003 rather than the newer IDNA2008 (RFC 5893) Bidi Rule, which allows digits at the end of an RTL label under specific constraints; however, strictly enforcing the more restrictive IDNA2003 rule in to_unicode guarantees that digits cannot appear at the start or end of any decoded RTL label.
Exploiting CVE-2026-141530 requires specific structural preconditions in the target domain name, accounting for its High Attack Complexity (AC:H) in the CVSS v3.1 vector. Specifically, the legitimate target domain must contain an RTL label positioned adjacent to a label containing digits (for example, شركة.123.example, whose ASCII Punycode representation is xn--ogbpi5d.123.example). Furthermore, the attacker must be able to register or control a complementary domain name that omits the leading digit of the numeric label (in this scenario, 23.example).
To execute the attack, the adversary configures a subdomain under 23.example using the Punycode label xn--1-3mcxl0f. In memory, xn--1-3mcxl0f decodes to the logical character sequence U+0031 (1), U+0634 (ش), U+0631 (ر), U+0643 (ك), U+0629 (ة). Because the digit 1 precedes the Arabic characters in logical order, it sits at index 0 of the first label.
When the complete attacker URI https://xn--1-3mcxl0f.23.example/ is parsed by a vulnerable version of Addressable and converted for display using display_uri or Addressable::IDNA.to_unicode, the parser produces the logical Unicode string:
[0]: '1' (EN)
[1..4]: 'شركة' (AL)
[5]: '.' (CS)
[6..7]: '23' (EN)
[8..15]: '.example' (CS, L)
When this string is rendered in a standard LTR display context, the Unicode Bidirectional Algorithm processes the directional runs. The Arabic letters (شركة) form a right-to-left run, while the leading character 1 (at logical index 0) is located visually at the right end of that RTL word—directly adjacent to the dot separator . and the following LTR digits 23. Consequently, the display engine renders the RTL letters on the left, followed by the dot, followed by 1, 2, and 3.
require "addressable/uri"
# Legitimate target domain vs. attacker-controlled complementary domain
inputs = %w[
https://xn--ogbpi5d.123.example/
https://xn--1-3mcxl0f.23.example/
]
inputs.each do |input|
uri = Addressable::URI.parse(input)
puts "Input: #{input}"
puts "Logical: #{uri.display_uri.host.codepoints.map { |c| c.to_s(16) }.join(' ')}"
puts "Display: #{uri.display_uri.host}"
endOn vulnerable versions of Addressable (>= 2.0.0, < 2.10.0) without idn-ruby installed, executing this proof-of-concept yields two strings that appear visually identical (شركة.123.example) in standard terminals, browsers, and UI components. On patched versions (>= 2.10.0), the second input fails bidi_rule_broken? and outputs xn--1-3mcxl0f.23.example, exposing the true underlying domain 23.example.
The security impact of CVE-2026-141530 is limited to visual spoofing and user interface misrepresentation. The vulnerability carries a CVSS v3.1 base score of 3.1 (Low) with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N. There is no impact on confidentiality or availability, and the integrity impact is rated Low because the flaw only affects the visual representation of hostnames presented to a human user.
Network routing, DNS resolution, TLS certificate validation, and Same-Origin Policy enforcement are not compromised by this vulnerability, provided those subsystems operate on the standard ASCII/Punycode representation (Addressable::URI#host or Addressable::URI#normalized_host). An HTTP client fetching https://xn--1-3mcxl0f.23.example/ will still resolve and connect to 23.example, not 123.example.
However, applications that rely on Addressable::URI#display_uri or Addressable::IDNA.to_unicode to render clickable links, audit logs, OAuth redirect targets, or webhook destinations to users are susceptible to phishing and masquerading attacks (MITRE ATT&CK T1566.002 and T1036). If an administrator or end user inspects a rendered URI to verify its authenticity before approving an action or clicking a link, the visual reordering can mislead them into trusting an attacker-controlled domain.
> [!NOTE]
> If an application erroneously performs programmatic security checks, allowlisting, or domain suffix validation against the output of display_uri.host or Addressable::IDNA.to_unicode rather than normalized_host, the string lengths and codepoint sequences of the two domains remain distinct in memory ("شركة.123.example" != "1شركة.23.example"). The spoofing effect occurs strictly at the text rendering layer when the Unicode Bidirectional Algorithm processes the string for human viewing.
To remediate CVE-2026-141530, upgrade the addressable gem to version 2.10.0 or later. Version 2.10.0 incorporates commit f44193750649a2e05f3971b46b19e9a3f19d35d7, which enforces the RFC 3454 Section 6 bidirectional rules in Addressable::IDNA::Pure during both ASCII and Unicode conversions.
Update the project's Gemfile to require the patched release and update the dependency lockfile:
gem "addressable", ">= 2.10.0"bundle update addressableFor environments where upgrading addressable is not immediately feasible, the vulnerability can be mitigated by installing the libidn system library and adding the idn-ruby gem to the application bundle. When idn-ruby is loadable in the Ruby runtime, Addressable automatically selects Addressable::IDNA::Native over Addressable::IDNA::Pure. Because libidn enforces the Nameprep bidirectional rules in its C implementation, enabling the native backend neutralizes the flaw.
# Workaround for Addressable < 2.10.0 (requires system libidn headers)
gem "idn-ruby"Additionally, developers should audit application code to ensure that Addressable::URI#display_uri and Addressable::IDNA.to_unicode are used strictly for visual presentation. All security-relevant operations—including origin validation, allowlist comparison, and HTTP request routing—must operate exclusively on Addressable::URI#normalized_host in its canonical ASCII/Punycode form.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
addressable sporkmonger | >= 2.0.0, <= 2.9.2 | 2.10.0 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-141530 (GHSA-fccw-gx6q-mh6c) |
| CWE Classification | CWE-451 / CWE-1007 (UI Misrepresentation / Homoglyph Spoofing) |
| CVSS v3.1 Score | 3.1 Low (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N) |
| Affected Component | addressable RubyGem (2.0.0 - 2.9.2) via Addressable::IDNA::Pure |
| Patched Version | addressable 2.10.0 |
| Attack Vector | Network (Crafted Punycode URI with mixed RTL and numeric characters) |
| Exploit Status | Proof-of-Concept (PoC) Published |
| CISA KEV Status | Not Listed |
The product provides an interface that does not properly represent critical information (such as a domain name or host) to the user, potentially causing them to make incorrect trust or security decisions.
CVE-2026-140248 is a High-severity path traversal and symbolic link resolution vulnerability (CWE-59) in the npm package tar (node-tar) affecting versions 7.5.22 through 7.5.24. When extracting archives under default security configurations (preservePaths: false), node-tar validates symbolic link targets using purely lexical path normalization via path.posix functions without accounting for intermediate symbolic link resolution on the host filesystem. By crafting an archive containing chained symbolic links, paths ending in trailing '/.' segments, or POSIX directory names containing backslashes, an attacker can plant a symbolic link inside the extraction directory that resolves to arbitrary locations outside the destination root. Downstream processes reading or writing through the extracted symlink can consequently disclose or overwrite arbitrary files on the host system.
A CRLF injection and HTTP request splitting vulnerability exists in the Ruby addressable gem from version 2.1.2 prior to 2.10.0. The Addressable::URI#request_uri method returns stored control characters and spaces without percent-encoding them. When an HTTP client writes the output of #request_uri directly into an HTTP request line without additional validation or normalization, an attacker supplying an untrusted URI can terminate the request line prematurely, inject arbitrary HTTP headers, or initiate a secondary HTTP request over a keep-alive connection.
An authentication bypass vulnerability in the Symfony Security HTTP component (symfony/security-http) causes programmatic login operations to skip the checkPostAuth() method of configured user checkers. Because AuthenticatorManager::authenticateUser() fails to dispatch the security.authentication.success event, custom post-authentication restrictions—such as checks for expired or locked accounts—are bypassed when users authenticate via programmatic flows like password resets or email verification callbacks.
CVE-2026-140015 is a high-severity Denial of Service (DoS) vulnerability affecting the Ruby gem websocket-driver in versions prior to 0.9.1. The flaw resides in the HyBi protocol parser (lib/websocket/driver/hybi.rb), which fails to stop buffering incoming TCP stream data after receiving a WebSocket close control frame. Because TCP supports half-open connections, an unauthenticated remote attacker can transmit a close frame to transition the state machine into a non-consuming shutdown stage, and subsequently stream arbitrary data over the open socket to exhaust server heap memory and crash the host Ruby process.
A high-severity denial-of-service vulnerability exists in node-tar versions 7.5.22 prior to 8.0.0 within the synchronous stream extraction implementation (UnpackSync). Due to an asymmetrical reference-counting design between the asynchronous base class Unpack and its synchronous subclass UnpackSync, handling any non-fatal entry error or skipped entry causes the internal pending operation counter to decrement below zero. Because the stream termination logic strictly checks for a counter value equal to zero, the extraction stream enters an unrecoverable state where lifecycle completion events (prefinish, finish, end) are never emitted, permanently blocking downstream stream consumers.
CVE-2026-140014 (also tracked as GHSA-8wcq-xq25-7fhm and RUSTSEC-2026-0594) is a cryptographic weakness in the Rust cookie library (cookie-rs). Affected versions use userspace thread-local pseudo-random number generators (rand::thread_rng() or rand::rng()) to generate 96-bit nonces for AES-256-GCM encrypted cookies in PrivateJar. Because these generators buffer entropy in userspace memory, invoking a Unix fork() system call without exec() clones the internal RNG buffer into child processes. When sibling or parent-child processes subsequently seal private cookies on the same thread using a shared key, they emit identical nonces. This nonce reuse under AES-GCM compromises ciphertext confidentiality via keystream XOR recovery and enables arbitrary cookie forgery via polynomial GHASH authentication key recovery.