Vulnerability DatabaseGHSA-4859-2mvh-r787

GHSA-4859-2mvh-r787: 
Ruby vulnerability analysis and mitigation

Impact

Phlex's tag method renders an element whose name is given at runtime, e.g. tag(name) { content }. Passing a user-provided tag name to tag is meant to be safe in Phlex, and GHSA-w67g-2h6v-vjgq covered an earlier bypass of the same protection. tag accepted any registered element, including script and style, whose content the browser runs as code rather than displaying as text. Escaping doesn't neutralise that content. tag also accepted base, which changes where the page loads its other scripts and links from. So an application that passes a user-provided tag name to tag was vulnerable to cross-site scripting when the element's content or attributes were also user-influenced. That includes user text as content, or a user-provided link. Phlex 1.x is not affected, because it doesn't have tag.

Patches

tag now refuses script, style and base in HTML, and script and style in SVG, by raising Phlex::ArgumentError. Code that renders these elements on purpose should call the element methods directly, e.g. script { … }, which are unchanged. The patched version is:

  • 2.4.2 We have also patched the main branch on GitHub. Phlex 2.0 to 2.3 are no longer maintained and won't get a patch. Please upgrade to 2.4.2.

Workarounds

If you can't upgrade straight away:

  • Allow only the tag names you expect before passing a user-provided name to tag.
  • A content security policy that disallows inline scripts and restricts script-src and base-uri stops injected script from running.

References

  • GHSA-w67g-2h6v-vjgq: Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values

Source: NVD

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-4859-2mvh-r787HIGH7.1
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-6gjg-cqh9-p2xmMEDIUM5.9
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-jjpx-qcfc-pqwpMEDIUM5.9
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-fxxw-9rf3-3f2wMEDIUM5.9
  • Ruby logoRuby
  • phlex
NoYesNov 23, 2026
GHSA-wcp8-qw9q-vjppMEDIUM4.9
  • Ruby logoRuby
  • doorkeeper-openid_connect
NoYesNov 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management