Skip to content

Commit 6b7ac02

Browse files
jasnowpostmodern
authored andcommitted
GHSA SYNC: 2 brand new advisories
1 parent 13ca6fb commit 6b7ac02

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

gems/mqtt/CVE-2025-12790.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
gem: mqtt
3+
cve: 2025-12790
4+
ghsa: 9c5q-w6gr-fxcq
5+
url: https://access.redhat.com/security/cve/CVE-2025-12790
6+
title: MQTT does not validate hostnames
7+
date: 2025-11-06
8+
description: |
9+
A flaw was found in Rubygem MQTT. By default, the package used to
10+
not have hostname validation, resulting in possible
11+
Man-in-the-Middle (MITM) attack.
12+
cvss_v3: 7.4
13+
patched_versions:
14+
- ">= 0.7.0"
15+
related:
16+
url:
17+
- https://nvd.nist.gov/vuln/detail/CVE-2025-12790
18+
- https://github.com/njh/ruby-mqtt/releases/tag/v0.7.0
19+
- https://github.com/njh/ruby-mqtt/blob/main/NEWS.md#ruby-mqtt-version-070-2025-10-29
20+
- https://access.redhat.com/security/cve/CVE-2025-12790
21+
- https://bugzilla.redhat.com/show_bug.cgi?id=2413004
22+
- https://github.com/advisories/GHSA-9c5q-w6gr-fxcq
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
gem: prosemirror_to_html
3+
ghsa: 52c5-vh7f-26fx
4+
url: https://github.com/etaminstudio/prosemirror_to_html/security/advisories/GHSA-52c5-vh7f-26fx
5+
title: Cross-Site Scripting (XSS) vulnerability through unescaped
6+
HTML attribute values
7+
date: 2025-11-06
8+
description: |
9+
### Impact
10+
11+
The prosemirror_to_html gem is vulnerable to Cross-Site Scripting
12+
(XSS) attacks through malicious HTML attribute values. While tag
13+
content is properly escaped, attribute values are not, allowing
14+
attackers to inject arbitrary JavaScript code.
15+
16+
**Who is impacted:**
17+
18+
- Any application using prosemirror_to_html to convert ProseMirror
19+
documents to HTML
20+
- Applications that process user-generated ProseMirror content are
21+
at highest risk
22+
- End users viewing the rendered HTML output could have malicious
23+
JavaScript executed in their browsers
24+
25+
**Attack vectors include:**
26+
27+
- `href` attributes with `javascript:` protocol:
28+
`<a href="javascript:alert(document.cookie)">`
29+
- Event handlers: `<div onclick="maliciousCode()">`
30+
- `onerror` attributes on images: `<img src=x onerror="alert('XSS')">`
31+
- Other HTML attributes that can execute JavaScript
32+
33+
### Patches
34+
35+
A fix is currently in development. Users should upgrade to version
36+
**0.2.1** or later once released.
37+
38+
The patch escapes all HTML attribute values using `CGI.escapeHTML`
39+
to prevent injection attacks.
40+
41+
### Workarounds
42+
43+
Until a patched version is available, users can implement one or
44+
more of these mitigations:
45+
46+
1. **Sanitize output**: Pass the HTML output through a sanitization
47+
library like [Sanitize](https://github.com/rgrove/sanitize) or
48+
[Loofah](https://github.com/flavorjones/loofah):
49+
50+
```ruby
51+
html = ProsemirrorToHtml.render(document)
52+
safe_html = Sanitize.fragment(html, Sanitize::Config::RELAXED)
53+
```
54+
55+
2. **Implement Content Security Policy (CSP)**: Add strict CSP
56+
headers to prevent inline JavaScript execution:
57+
```
58+
Content-Security-Policy: default-src 'self'; script-src 'self'
59+
```
60+
61+
3. **Input validation**: If possible, validate and sanitize
62+
ProseMirror documents before conversion to prevent malicious
63+
content from entering the system.
64+
65+
### References
66+
67+
- Vulnerable code: https://github.com/etaminstudio/prosemirror_to_html/blob/ea8beb32f6c37f29f042ba4155ccf18504da716e/lib/prosemirror_to_html.rb#L249
68+
- [OWASP XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html)
69+
- [CWE-79: Improper Neutralization of Input During Web Page Generation](https://cwe.mitre.org/data/definitions/79.html)
70+
cvss_v3: 7.6
71+
patched_versions:
72+
- ">= 0.2.1"
73+
related:
74+
url:
75+
- https://github.com/etaminstudio/prosemirror_to_html/security/advisories/GHSA-52c5-vh7f-26fx
76+
- https://github.com/etaminstudio/prosemirror_to_html/releases/tag/v0.2.1
77+
- https://github.com/etaminstudio/prosemirror_to_html/commit/4d59f94f550bcabeec30d298791bbdd883298ad8
78+
- https://github.com/advisories/GHSA-52c5-vh7f-26fx

0 commit comments

Comments
 (0)