Commit 179ff58b authored by joubu's avatar joubu Committed by Kyle M Hall

Bug 17903: Fix possible SQL injection in serial claims

To recreate:
/cgi-bin/koha/serials/claims.pl?serialid=1)and%20(select*from(select(sleep(20)))a)--%20&letter_code=0

Notice the delay.

The SQL query is not constructed correctly, placeholders must be used.

This vulnerability has been reported by MDSec.
Signed-off-by: default avatarMirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: default avatarMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
parent cb4fa17a
......@@ -501,10 +501,10 @@ sub SendAlerts {
return { error => "no_order_selected" };
}
$strsth .= join( ",", @$externalid ) . ")";
$strsth .= join( ",", ('?') x @$externalid ) . ")";
$action = "CLAIM ISSUE";
$sthorders = $dbh->prepare($strsth);
$sthorders->execute;
$sthorders->execute( @$externalid );
$dataorders = $sthorders->fetchall_arrayref( {} );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment