Skip to content

Commit ed729a1

Browse files
asgerfmchammer01
andauthored
Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent fd293d0 commit ed729a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

javascript/change-notes/2020-11-25-prototype-pollution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
lgtm,codescanning
2-
* Detection of prototype pollution has improved and the queries involved have been reorganized:
2+
* We've improved the detection of prototype pollution, and the queries involved have been reorganized:
33
* A new query "Prototype-polluting assignment" (`js/prototype-polluting-assignment`) has been added. This query
44
highlights direct modifications of an object obtained via a user-controlled property name, which may accidentally alter `Object.prototype`.
55
* The query previously named "Prototype pollution" (`js/prototype-pollution`) has been renamed to "Prototype-polluting merge call".

javascript/ql/src/Security/CWE-915/PrototypePollutingAssignment.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p>
88
Most JavaScript objects inherit the properties of the built-in <code>Object.prototype</code> object.
99
Prototype pollution is a type of vulnerability in which an attacker is able to modify <code>Object.prototype</code>.
10-
Since most objects inherit from the compromised <code>Object.prototype</code>, the attacker can use this
10+
Since most objects inherit from the compromised <code>Object.prototype</code> object, the attacker can use this
1111
to tamper with the application logic, and often escalate to remote code execution or cross-site scripting.
1212
</p>
1313

@@ -23,7 +23,7 @@
2323
<p>
2424
Use an associative data structure that is resilient to untrusted key values, such as a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a>.
2525
In some cases, a prototype-less object created with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create">Object.create(null)</a>
26-
may be preferrable.
26+
may be preferable.
2727
</p>
2828
<p>
2929
Alternatively, restrict the computed property name so it can't clash with a built-in property, either by

0 commit comments

Comments
 (0)