Koha/authorities
Chris Nighswonger b0f60221f4 Security Bugfix: Bug 1953 Adding Placeholders to SQL To Avoid Potential Injection Attacks
This patch addresses both security issues mentioned in the summary of the report
submitted by Frère Sébastien Marie included below.

---------------------------
The problem is here: 'C4/AuthoritiesMarc.pm' in the function 'DelAuthority':
The argument $authid is included directly (not via statement) in the SQL.

For the exploit of this problem, you can use 'authorities/authorities-home.pl'
with authid on the URL and op=delete (something like
"authorities/authorities-home.pl?op=delete&authid=xxx").

This should successfully call DelAuthority, without authentification...
(DelAuthority is call BEFORE get_template_and_user, so before authentification
[This should be an issue also...]).

Please note that the problem isn't only that anyone can delete an authority of
this choose, it is more general: with "authid=1%20or%1=1" (after inclusion sql
will be like: "delete from auth_header where authid=1 or 1=1") you delete all
authorities ; with "authid=1;delete%20from%xxx" it is "delete from auth_header
where authid=1;delete from xxx" and so delete what you want...

SQL-INJECTION is very permissive: you can redirect the output in a file (with
some MySQL function), so write thea file of you choose in the server, in order
to create a backdoor, and compromise the server.

Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-25 07:08:39 +13:00
..
auth_finder.pl Bug 4838 Allow to choose which authority heading to copy into biblio record 2010-12-21 16:50:45 +13:00
authorities-home.pl Security Bugfix: Bug 1953 Adding Placeholders to SQL To Avoid Potential Injection Attacks 2011-02-25 07:08:39 +13:00
authorities-list.pl Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
authorities.pl bug5455 (Fix uninitialized-warnings on authorities.pl) 2010-12-12 22:50:01 +13:00
blinddetail-biblio-search.pl Bug 4838 Allow to choose which authority heading to copy into biblio record 2010-12-21 16:50:45 +13:00
detail-biblio-search.pl Bug 5385: POD Cleanups (part 2) 2010-11-12 10:06:56 +13:00
detail.pl Bug 5385: POD Cleanups (part 2) 2010-11-12 10:06:56 +13:00