Headline
CVE-2021-43852: BAP-21092: JavaScript Prototype Pollution (#31464) · oroinc/platform@62c2693
OroPlatform is a PHP Business Application Platform. In affected versions by sending a specially crafted request, an attacker could inject properties into existing JavaScript language construct prototypes, such as objects. Later this injection may lead to JS code execution by libraries that are vulnerable to Prototype Pollution. This issue has been patched in version 4.2.8. Users unable to upgrade may configure a firewall to drop requests containing next strings: __proto__ , constructor[prototype], and constructor.prototype to mitigate this issue.
Permalink
Browse files
BAP-21092: JavaScript Prototype Pollution (#31464)
- Loading branch information
1 parent d9929d4 commit 62c26936b3adee9c20255dcd9f8ee5c299b464a9
Showing with 4 additions and 0 deletions.
- +4 −0 src/Oro/Bundle/UIBundle/Resources/public/js/tools.js
@@ -85,6 +85,10 @@ define(function(require) {
query = query.slice(1);
}
const setValue = function(root, path, value) {
if (path[0] === ‘__proto__’) {
// Prevent Object.prototype pollution
return;
}
if (path.length > 1) {
const dir = path.shift();
if (typeof root[dir] === ‘undefined’) {
0 comments on commit 62c2693
Please sign in to comment.