
# CVE-2021-23410 के लिए प्रूफ-ऑफ-कॉन्सेप्ट प्रदर्शित करने वाला परीक्षण रिपॉजिटरी msgpack में CVE-2021-23410 के लिए प्रूफ-ऑफ-कॉन्सेप्ट प्रदर्शित करने वाला परीक्षण रिपॉजिटरी, यह विश्लेषण करता है कि क्या रिपोर्ट की गई डिसीरियलाइज़ेशन भेद्यता शोषण योग्य है।
https://snyk.io/vuln/SNYK-JS-MSGPACK-1296122 के लिए परीक्षण
यह भेद्यता नहीं लगती है।
var assert = require('assert');
var msgpack = require('msgpack');
function sleep(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
async function init() {
var normal = { "a": 1, "b": 2, "c": [1, 2, 3] };
var malicious = msgpack.pack({
exploit: function () {
// Note(by @azu): This Poc just run child_process.exec
// It is not related to msgpack
require('child_process').exec('echo code_executed!;sleep 3', function (error, stdout, stderr) {
console.log(stdout)
});
}(),
});
var rce = msgpack.unpack(malicious);
assert.deepEqual(rce, normal);
}
init();
Adi Malyanker द्वारा PoC
यह PoC केवल child_pross.exec चलाता है, इसलिए यह msgpack की भेद्यता नहीं है।
git clone [email protected]:azu/msgpack-CVE-2021-23410-test.git
cd msgpack-CVE-2021-23410-test
npm install
npm test