You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+16-7
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# Magento 2 Template Filter Patch for CVE-2022-24086
1
+
# Magento 2 Template Filter Patch for CVE-2022-24086, CVE-2022-24087
2
2
3
-
**Magento 2 patch for CVE-2022-24086. Fix the RCE vulnerability and related bugs by performing deep template variable escaping. If you cannot upgrade Magento or cannot apply the official patches, try this one.**
3
+
**Magento 2 patch for CVE-2022-24086, CVE-2022-24087. Fix the RCE vulnerability and related bugs by performing deep template variable escaping. If you cannot upgrade Magento or cannot apply the official patches, try this one.**
[CVE-2022-24086](https://nvd.nist.gov/vuln/detail/cve-2022-24086) was discovered in the beginning of 2022. For Magento 2.4 releases, all versions <= 2.4.3-p1 are affected by this Remote Code Execution(RCE) vulnerability. 2 [official isolated patches](https://helpx.adobe.com/security/products/magento/apsb22-12.html) were released on February 2022.
9
+
[CVE-2022-24086, CVE-2022-24087](https://nvd.nist.gov/vuln/detail/cve-2022-24086) was discovered in the beginning of 2022. For Magento 2.4 releases, all versions <= 2.4.3-p1 are affected by this Remote Code Execution(RCE) vulnerability. 2 [official isolated patches](https://helpx.adobe.com/security/products/magento/apsb22-12.html) were released on February 2022.
10
10
11
11
However, even in late 2024, we are still receiving consultations regarding this issue and their hacked stores were identified that this vulnerability was exploited. Most observed attacks were performed by inputting a string that contains `template directive`.
12
12
@@ -29,28 +29,35 @@ Although the [official documentation](https://web.archive.org/web/20220710211400
29
29
This patch(extension) also keeps the above features. So `{{var data_object.something}}` and `{{var data_object.getSomething()}}` are both OK and equivalent.
- Objects which are not `\Magento\Framework\DataObject` or its child instance cannot be accessed
38
40
- Only "Getter" methods are allowed on `\Magento\Framework\DataObject` and its child instances
39
41
-`getUrl` method is only working on `this`
40
42
41
-
42
43
## Technical Info
43
44
44
45
### Official Approach
45
46
46
47
##### >=2.4.3-p2
48
+
47
49
Removed `LegacyResolver` to stop the RCE.
50
+
48
51
##### >=2.4.4-p2 || >=2.4.5-p1
52
+
49
53
Introduced "deferred directive with signature" for child template. We are unsure if it has any security enhancement.
54
+
50
55
##### Latest(2.4.7-p3)
56
+
51
57
Still has an unfixed bug([#39353](https://github.com/magento/magento2/issues/39353)).
52
58
53
59
### Our Approach
60
+
54
61
Use "deep template variable escaping" before the template filtering process. `LegacyResolver` will only receive escaped user data and hence can be kept.
55
62
56
63
# Requirements
@@ -62,6 +69,8 @@ Use "deep template variable escaping" before the template filtering process. `Le
"description": "Magento 2 patch for CVE-2022-24086. Fix the RCE vulnerability and related bugs by performing deep template variable escaping. If you cannot upgrade Magento or cannot apply the official patches, try this one.",
3
+
"description": "Magento 2 patch for CVE-2022-24086, CVE-2022-24087. Fix the RCE vulnerability and related bugs by performing deep template variable escaping. If you cannot upgrade Magento or cannot apply the official patches, try this one.",
0 commit comments