{"id":"CVE-2024-32463","aliases":["CVE-2024-32463","GHSA-g7xq-xv8c-h98c"],"related":[],"kind":"vulnerability","state":"published","title":"phlex makes Cross-site Scripting (XSS) possible due to improper sanitisation of `href` attributes on `<a>` tags","summary":"phlex is an open source framework for building object-oriented views in Ruby. There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data. The filter to detect and prevent the use of the `javascript:` URL scheme in the `href` attribute of an `<a>` tag could be bypassed with tab `\\t` or newline `\\n` characters between the characters of the protocol, e.g. `java\\tscript:`. This vulnerability is fixed in 1.10.1, 1.9.2, 1.8.3, 1.7.2, 1.6.3, 1.5.3, and 1.4.2. Configuring a Content Security Policy that does not allow `unsafe-inline` would effectively prevent this vulnerability from being exploited.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"phlex is an open source framework for building object-oriented views in Ruby. There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data. The filter to detect and prevent the use of the `javascript:` URL scheme in the `href` attribute of an `<a>` tag could be bypassed with tab `\\t` or newline `\\n` characters between the characters of the protocol, e.g. `java\\tscript:`. This vulnerability is fixed in 1.10.1, 1.9.2, 1.8.3, 1.7.2, 1.6.3, 1.5.3, and 1.4.2. Configuring a Content Security Policy that does not allow `unsafe-inline` would effectively prevent this vulnerability from being exploited.","source":"cvelist"},{"lang":"en","text":"### Summary\nThere is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data.\n\nOur filter to detect and prevent the use of the `javascript:` URL scheme in the `href` attribute of an `<a>` tag could be bypassed with tab `\\t` or newline `\\n` characters between the characters of the protocol, e.g. `java\\tscript:`.\n\n### Impact\n\nIf you render an `<a>` tag with an `href` attribute set to a user-provided link, that link could potentially execute JavaScript when clicked by another user.\n\n```ruby\na(href: user_profile) { \"Profile\" }\n```\n\n### Mitigation\n\nThe best way to mitigate this vulnerability is to update to one of the following versions:\n\n- [1.10.1](https://rubygems.org/gems/phlex/versions/1.10.1)\n- [1.9.2](https://rubygems.org/gems/phlex/versions/1.9.2)\n- [1.8.3](https://rubygems.org/gems/phlex/versions/1.8.3)\n- [1.7.2](https://rubygems.org/gems/phlex/versions/1.7.2)\n- [1.6.3](https://rubygems.org/gems/phlex/versions/1.6.3)\n- [1.5.3](https://rubygems.org/gems/phlex/versions/1.5.3)\n- [1.4.2](https://rubygems.org/gems/phlex/versions/1.4.2)\n\n### Workarounds\nConfiguring a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) that does not allow [`unsafe-inline`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#unsafe-inline) would effectively prevent this vulnerability from being exploited.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Phlex es un framework de código abierto para crear vistas orientadas a objetos en Ruby. Existe una posible vulnerabilidad de cross-site scripting (XSS) que puede explotarse mediante datos de usuario creados con fines malintencionados. El filtro para detectar y evitar el uso del esquema de URL `javascript:` en el atributo `href` de una etiqueta `<a rel=\"nofollow\">` podría omitirse con tabulaciones `\\t` o caracteres de nueva línea `\\n` entre los caracteres de el protocolo, por ejemplo `java\\tscript:`. Esta vulnerabilidad se solucionó en 1.10.1, 1.9.2, 1.8.3, 1.7.2, 1.6.3, 1.5.3 y 1.4.2. Configurar una política de seguridad de contenido que no permita \"inseguro en línea\" evitaría efectivamente que se aproveche esta vulnerabilidad.</a>","source":"nvd"}],"published":"2024-04-17T00:20:23.000Z","modified":"2026-09-10T03:50:11.506Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"}],"cwes":["CWE-79","CWE-87"],"affected":[{"ranges":[{"version":">= 1.10.0, < 1.10.1","status":"affected"},{"version":">= 1.9.0, < 1.9.2","status":"affected"},{"version":">= 1.8.0, < 1.8.3","status":"affected"},{"version":">= 1.7.0, < 1.7.2","status":"affected"},{"version":">= 1.6.0, < 1.6.3","status":"affected"},{"version":">= 1.5.0, < 1.5.3","status":"affected"},{"version":">= 1.4.0, < 1.4.2","status":"affected"}],"vendor":"phlex-ruby","product":"phlex","source":"cvelist"},{"ranges":[{"version":"1.0.0","status":"affected"}],"vendor":"ruby","product":"fileutils","cpe":"cpe:2.3:a:ruby:fileutils:1.0.0:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.10.0","status":"affected","fixed":"1.10.1"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.9.0","status":"affected","fixed":"1.9.2"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.8.0","status":"affected","fixed":"1.8.3"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.7.0","status":"affected","fixed":"1.7.2"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.6.0","status":"affected","fixed":"1.6.3"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.5.0","status":"affected","fixed":"1.5.3"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.4.2"}],"ecosystem":"RubyGems","package":"phlex","purl":"pkg:gem/phlex","source":"ghsa"}],"references":[{"url":"https://github.com/phlex-ruby/phlex/security/advisories/GHSA-g7xq-xv8c-h98c","tags":["web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/phlex-ruby/phlex/commit/9e3f5b980655817993682e409cbda72956d865cb","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#unsafe-inline","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32463","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/phlex-ruby/phlex","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/phlex/CVE-2024-32463.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-04-23T18:58:58.573Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-32463","url":"https://www.cve.org/CVERecord?id=CVE-2024-32463","licence":"CVE Terms of Use","modified":"2024-08-02T02:13:39.303Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g7xq-xv8c-h98c","url":"https://github.com/advisories/GHSA-g7xq-xv8c-h98c","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:11.506Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-32463","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32463","licence":"Public domain","modified":"2026-06-17T07:29:40.750Z"}],"updatedAt":"2026-11-25T22:58:39.415Z","epss":{"score":0.00813,"percentile":0.54003,"date":"2026-11-30T12:00:22.000Z"}}