BREW-MIKUTTER-CVE-2026-126348 (GHSA-9CRM-G4MF-WC5J)

Vulnerability from osv_homebrew – Published: 2026-11-13 09:16 – Updated: 2026-11-13 09:16 – Source website
VLAI
Summary
Addressable display_uri can show misleading hosts with invalid Punycode A-labels
Details

Impact

Addressable::IDNA.to_unicode, in the pure-Ruby IDNA implementation, decodes Punycode labels (labels beginning with xn--) that are not valid A-labels. Those labels are returned in decoded form, when they should be returned unchanged. That includes:

  • labels that decode to only ASCII characters, e.g. xn--google- decodes to google;
  • labels that decode to text that doesn't convert back to the same label (RFC 3490 §4.2), e.g. text that isn't in normalized form.

Addressable::URI#display_uri uses to_unicode, so for https://xn--google-.example.org/ it displays the host google.example.org, while #host, #normalized_host and any connection made from the URI use xn--google-.example.org. An attacker who controls a domain can therefore have a URI displayed as a host they don't control. Applications that compare the result of to_unicode against a list of trusted names can likewise treat two different hosts as the same.

The native IDNA implementation, used when libidn and the idn-ruby gem are installed, is not affected. to_ascii and normalized_host are not affected.

Affected Versions

This vulnerability affects Addressable >= 2.0.0, the first version with the pure-Ruby IDNA implementation, when that implementation is in use. It is fixed in 2.9.1, where such labels are returned unchanged, as with libidn.

Workarounds

  • Install libidn and the idn-ruby gem, so that Addressable uses the native IDNA implementation.
  • Don't make security decisions on display_uri or to_unicode output. Compare hosts using normalized_host.

Credits

Reported by @tonghuaroot.

For more information

If there are any questions or comments about this advisory: * Open an issue


{
  "affected": [
    {
      "ecosystem_specific": {
        "fix": null,
        "range_state": "affected",
        "resource": "addressable",
        "resource_purl": "pkg:gem/addressable@2.8.6",
        "upstream_fixed_in": "2.9.1"
      },
      "package": {
        "ecosystem": "Homebrew",
        "name": "mikutter",
        "purl": "pkg:brew/mikutter"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.4.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "confidence": "high",
    "source": "matched",
    "strategy": "registry",
    "upstream_evidence": [
      {
        "ecosystem": "RubyGems",
        "key": "pkg:gem/addressable@2.8.6",
        "name": "addressable",
        "resource": "addressable",
        "strategy": "registry",
        "subject_version": "2.8.6"
      }
    ]
  },
  "details": "### Impact\n\n`Addressable::IDNA.to_unicode`, in the pure-Ruby IDNA implementation, decodes Punycode labels (labels beginning with `xn--`) that are not valid A-labels. Those labels are returned in decoded form, when they should be returned unchanged. That includes:\n\n- labels that decode to only ASCII characters, e.g. `xn--google-` decodes to `google`;\n- labels that decode to text that doesn\u0027t convert back to the same label (RFC 3490 \u00a74.2), e.g. text that isn\u0027t in normalized form.\n\n`Addressable::URI#display_uri` uses `to_unicode`, so for `https://xn--google-.example.org/` it displays the host `google.example.org`, while `#host`, `#normalized_host` and any connection made from the URI use `xn--google-.example.org`. An attacker who controls a domain can therefore have a URI displayed as a host they don\u0027t control. Applications that compare the result of `to_unicode` against a list of trusted names can likewise treat two different hosts as the same.\n\nThe native IDNA implementation, used when libidn and the `idn-ruby` gem are installed, is not affected. `to_ascii` and `normalized_host` are not affected.\n\n### Affected Versions\n\nThis vulnerability affects Addressable \u003e= 2.0.0, the first version with the pure-Ruby IDNA implementation, when that implementation is in use. It is fixed in 2.9.1, where such labels are returned unchanged, as with libidn.\n\n### Workarounds\n\n- Install libidn and the `idn-ruby` gem, so that Addressable uses the native IDNA implementation.\n- Don\u0027t make security decisions on `display_uri` or `to_unicode` output. Compare hosts using `normalized_host`.\n\n### Credits\n\nReported by @tonghuaroot.\n\n### For more information\n\nIf there are any questions or comments about this advisory:\n* [Open an issue](https://github.com/sporkmonger/addressable/issues)",
  "id": "BREW-mikutter-CVE-2026-126348",
  "modified": "2026-11-13T09:16:38Z",
  "published": "2026-11-13T09:16:38Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/security/advisories/GHSA-9crm-g4mf-wc5j"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/commit/b8a59cc0e03f8704f1d7c8122fc8f7ef8548362d"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/GHSA-9crm-g4mf-wc5j.yml"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/sporkmonger/addressable"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Addressable display_uri can show misleading hosts with invalid Punycode A-labels",
  "upstream": [
    "GHSA-9crm-g4mf-wc5j",
    "CVE-2026-126348"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…