Is loofah 2.5 vulnerable?

RubyGems · 1 release from 2.5.0 to 2.5.0 · latest loofah is 2.25.3 · checked 18 Nov 2026

Yes: 7 known advisories

Yes. loofah 2.5.0, the last 2.5 release, is affected by 7 known security advisories (2 high, 5 medium), including CVE-2022-23516, CVE-2022-23514, CVE-2026-126208. Upgrade to 2.25.3 or later to fix all of them.

Upgrade with:bundle update --conservative loofah # Gemfile: '>= 2.25.3'

Is your project on an affected loofah?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Advisories affecting loofah 2.5.0

  • MediumCVE-2026-126208GHSA-345x-3rq2-jfrm12 Nov 2026

    Loofah: SVG `<textPath>` and `<mpath>` bypass local-reference restriction

    Affected
    <2.25.3
    Fixed in
    2.25.3
  • MediumCVE-2026-126207GHSA-m3x9-938q-576712 Nov 2026

    Loofah: CSS url() sanitization bypass via escaped parentheses

    Affected
    <2.25.3
    Fixed in
    2.25.3
  • MediumCVE-2026-126205GHSA-mf2j-8f84-cc9q12 Nov 2026

    Loofah: Regular expression denial of service in the SVG local-reference check

    Affected
    <2.25.3
    Fixed in
    2.25.3
  • MediumCVE-2026-73490GHSA-9wjq-cp2p-hrgf21 Jul 2026

    Loofah: SVG `href` attribute bypasses local-reference restriction

    Affected
    <2.25.2
    Fixed in
    2.25.2
  • HighCVE-2022-23516GHSA-3x8r-x6xp-q4vm13 Dec 2022

    Uncontrolled Recursion in Loofah

    Affected
    >=2.2.0 <2.19.1
    Fixed in
    2.19.1
  • MediumCVE-2022-23515GHSA-228g-948r-83gx13 Dec 2022

    Improper neutralization of data URIs may allow XSS in Loofah

    Affected
    >=2.1.0 <2.19.1
    Fixed in
    2.19.1
  • HighCVE-2022-23514GHSA-486f-hjj9-9vhh13 Dec 2022

    Inefficient Regular Expression Complexity in Loofah

    Affected
    <2.19.1
    Fixed in
    2.19.1

Which of your client projects are still on loofah 2.5?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact loofah version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other loofah versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the RubyGems registry. Refreshed daily.