Skip to content

Commit 845b64d

Browse files
1 parent 4cb4ca1 commit 845b64d

File tree

3 files changed

+185
-37
lines changed

3 files changed

+185
-37
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-5vw8-r55w-f4q4",
4+
"modified": "2025-11-07T23:18:53Z",
5+
"published": "2022-05-24T19:12:47Z",
6+
"aliases": [
7+
"CVE-2021-36032"
8+
],
9+
"summary": "Magento is affected by an improper input validation vulnerability",
10+
"details": "Magento Commerce versions 2.4.2 (and earlier), 2.4.2-p1 (and earlier) and 2.3.7 (and earlier) are affected by an improper input validation vulnerability. An authenticated attacker can trigger an insecure direct object reference in the `V1/customers/me` endpoint to achieve information exposure and privilege escalation.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "magento/project-community-edition"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "2.0.2"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "Packagist",
40+
"name": "magento/community-edition"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "0"
48+
},
49+
{
50+
"fixed": "2.3.7-p1"
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"package": {
58+
"ecosystem": "Packagist",
59+
"name": "magento/community-edition"
60+
},
61+
"versions": [
62+
"2.3.7"
63+
]
64+
},
65+
{
66+
"package": {
67+
"ecosystem": "Packagist",
68+
"name": "magento/community-edition"
69+
},
70+
"ranges": [
71+
{
72+
"type": "ECOSYSTEM",
73+
"events": [
74+
{
75+
"introduced": "2.4.2-p1"
76+
},
77+
{
78+
"fixed": "2.4.2-p2"
79+
}
80+
]
81+
}
82+
]
83+
},
84+
{
85+
"package": {
86+
"ecosystem": "Packagist",
87+
"name": "magento/community-edition"
88+
},
89+
"versions": [
90+
"2.4.2"
91+
]
92+
}
93+
],
94+
"references": [
95+
{
96+
"type": "ADVISORY",
97+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-36032"
98+
},
99+
{
100+
"type": "PACKAGE",
101+
"url": "https://github.com/magento/magento2"
102+
},
103+
{
104+
"type": "WEB",
105+
"url": "https://helpx.adobe.com/security/products/magento/apsb21-64.html"
106+
}
107+
],
108+
"database_specific": {
109+
"cwe_ids": [
110+
"CWE-20",
111+
"CWE-639"
112+
],
113+
"severity": "HIGH",
114+
"github_reviewed": true,
115+
"github_reviewed_at": "2025-11-07T23:18:53Z",
116+
"nvd_published_at": "2021-09-01T15:15:00Z"
117+
}
118+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-vfpf-xmwh-8m65",
4+
"modified": "2025-11-07T23:17:31Z",
5+
"published": "2025-11-07T23:17:31Z",
6+
"aliases": [],
7+
"summary": "ProsemirrorToHtml has a Cross-Site Scripting (XSS) vulnerability through unescaped HTML attribute values",
8+
"details": "### Impact\n\nThe prosemirror_to_html gem is vulnerable to Cross-Site Scripting\n(XSS) attacks through malicious HTML attribute values. While tag\ncontent is properly escaped, attribute values are not, allowing\nattackers to inject arbitrary JavaScript code.\n\n**Who is impacted:**\n\n- Any application using prosemirror_to_html to convert ProseMirror\n documents to HTML\n- Applications that process user-generated ProseMirror content are\n at highest risk\n- End users viewing the rendered HTML output could have malicious\n JavaScript executed in their browsers\n\n**Attack vectors include:**\n\n- `href` attributes with `javascript:` protocol:\n `<a href=\"javascript:alert(document.cookie)\">`\n- Event handlers: `<div onclick=\"maliciousCode()\">`\n- `onerror` attributes on images: `<img src=x onerror=\"alert('XSS')\">`\n- Other HTML attributes that can execute JavaScript\n\n### Patches\n\nA fix is currently in development. Users should upgrade to version\n**0.2.1** or later once released.\n\nThe patch escapes all HTML attribute values using `CGI.escapeHTML`\nto prevent injection attacks.\n\n### Workarounds\n\nUntil a patched version is available, users can implement one or\nmore of these mitigations:\n\n1. **Sanitize output**: Pass the HTML output through a sanitization\n library like [Sanitize](https://github.com/rgrove/sanitize) or\n [Loofah](https://github.com/flavorjones/loofah):\n\n```ruby\n html = ProsemirrorToHtml.render(document)\n safe_html = Sanitize.fragment(html, Sanitize::Config::RELAXED)\n```\n\n2. **Implement Content Security Policy (CSP)**: Add strict CSP\n headers to prevent inline JavaScript execution:\n```\n Content-Security-Policy: default-src 'self'; script-src 'self'\n```\n\n3. **Input validation**: If possible, validate and sanitize\n ProseMirror documents before conversion to prevent malicious\n content from entering the system.\n\n### References\n\n- Vulnerable code: https://github.com/etaminstudio/prosemirror_to_html/blob/ea8beb32f6c37f29f042ba4155ccf18504da716e/lib/prosemirror_to_html.rb#L249\n- [OWASP XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html)",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "RubyGems",
19+
"name": "prosemirror_to_html"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "0.2.1"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/etaminstudio/prosemirror_to_html/security/advisories/GHSA-52c5-vh7f-26fx"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/etaminstudio/prosemirror_to_html/commit/4d59f94f550bcabeec30d298791bbdd883298ad8"
44+
},
45+
{
46+
"type": "PACKAGE",
47+
"url": "https://github.com/etaminstudio/prosemirror_to_html"
48+
},
49+
{
50+
"type": "WEB",
51+
"url": "https://github.com/etaminstudio/prosemirror_to_html/blob/ea8beb32f6c37f29f042ba4155ccf18504da716e/lib/prosemirror_to_html.rb#L249"
52+
},
53+
{
54+
"type": "WEB",
55+
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/prosemirror_to_html/GHSA-52c5-vh7f-26fx.yml"
56+
}
57+
],
58+
"database_specific": {
59+
"cwe_ids": [
60+
"CWE-79"
61+
],
62+
"severity": "HIGH",
63+
"github_reviewed": true,
64+
"github_reviewed_at": "2025-11-07T23:17:31Z",
65+
"nvd_published_at": null
66+
}
67+
}

advisories/unreviewed/2022/05/GHSA-5vw8-r55w-f4q4/GHSA-5vw8-r55w-f4q4.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)