Visit the Wiz Whimzical Shop at AWS re:Invent
Vulnerability DatabaseGHSA-h2mr-m3v3-cq8c

GHSA-h2mr-m3v3-cq8c: 
JavaScript vulnerability analysis and mitigation

Summary

Every port's database URL redaction (and the node graph/MQTT error paths) prints the password in clear when the URL has a shape the redaction regex does not expect. The password then lands in startup logs, connection errors and exception messages. Checked on v3 3.13.159 (py c023c2df, php e27ddb77, rb 0d06ee2, nd ad0be87); the redaction code is unchanged since 3.13.158. Shapes that leak (password Pq1Rs2, any scheme), on at least one port each:

  • a password containing /, ?, #, @, % or a space: postgres://u:Pq1/Rs2@host/db
  • one slash or no colon after the scheme: postgres:/u:Pq1Rs2@host/db, postgres//u:Pq1Rs2@host/db
  • no host: postgres://u:Pq1Rs2, postgres://u:Pq1/Rs2
  • a non-numeric port: postgres://u:Pq1Rs2@host:notaport/db Leaking shapes per port on stock (14 shapes across each port's schemes): python 10, ruby 14, node 58, php 17.

Mechanism

  • python tina4_python/database/database_url.py:68 (redact_url): the regex (://[^/@\s:]*:)[^/\r\n]*@ cannot cross / and never matches scheme:/, scheme// or a URL without a host. :303 re-raises the stdlib "Port could not be cast to integer value as 'Pq1'" message, which quotes the password.
  • ruby lib/tina4/database_url.rb:195 cuts the authority at the first ? or #. redact trusts URI.parse, which accepts postgres:/u:pw@h, u:p@/q@h and u:12?q@h with the password in the path or query. :341 keeps URI::InvalidURIError, whose message holds the raw URL, as the raised error's cause. graph.rb:90 and websocket_backplane.rb:99 do the same.
  • node packages/orm/src/databaseUrl.ts: authorityOf cuts at the first /, ? or #, so redactCredentials returns the raw URL and invalidUrlError names u:Pq1 as the host. The mssql and firebird patterns split at the first @. new URL accepts postgres:/... and u:12?q@h. packages/core/src/mqtt.ts quotes the raw URL in four error messages.
  • php Tina4/DatabaseUrl.php: the redact regex ([^/?#]*)@ returns those shapes unchanged into "Cannot determine database type from ..." (Database.php) and "Invalid URL format ...". parse_url accepts postgres:/u:pw@h, and PostgresAdapter then prints dbname='u:pw@...'.

Reproduction

A probe per port feeds each shape to that port's real redact, parse and connect paths and greps the output for Pq1 or Rs2. Stock leaks the counts above; a fixed tree leaks 0.

Fix (one rule, all four ports)

  • Userinfo ends at the last @ on the line, and the password starts at the first : after the scheme. A / before that : means the text is a path, not a password.
  • The authority starts after scheme://, scheme:/ or scheme//.
  • With no @, a non-numeric port is treated as the password and masked to the end of the value, keeping a ?key=value query.
  • Parsers refuse a URL without scheme://, or whose @ count differs from what the parser took as userinfo, with a generic message that does not echo the value. Parse errors no longer chain the stdlib error that quotes the URL. Behaviour change: an unencoded @ in a URL's query is now refused (encode it as %40). Over-redaction can mask a host if a second @ appears later on the same log line; it never shows a password. Patches for all four ports, each with a regression test that fails on stock (python 36/46 cases, ruby 35/43, node 18/25, php 18/20) and passes fixed, sweeping passwords built from /?#@:%, a space and empty, plus no-host and one-slash URLs, are ready and apply cleanly to 3.13.159. Every part of the fix was gated by mutation, and full-suite failure sets match stock. Not covered by the patches: python kafka/AMQP and graph/Redis urlparse errors, php AMQP splitting at the first @, the php MySQLAdapter message that prints the raw host string, and node devAdmin returning the raw URL. A host-less URL whose password is all digits (postgres://u:123/x) cannot be told apart from a port and stays unmasked.

Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-140097CRITICAL9.1
  • JavaScript logoJavaScript
  • vite
NoYesNov 30, 2026
CVE-2026-140010HIGH8.7
  • JavaScript logoJavaScript
  • html-minifier
NoYesNov 30, 2026
CVE-2026-140008HIGH8.7
  • JavaScript logoJavaScript
  • minimatch
NoYesNov 30, 2026
CVE-2026-140102HIGH7.5
  • JavaScript logoJavaScript
  • http-proxy-middleware
NoNoNov 30, 2026
CVE-2026-140103MEDIUM5.4
  • JavaScript logoJavaScript
  • http-proxy-middleware
NoYesNov 30, 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