Skip to content

C1: SQL injection through user_id and holiday_annual in do_holiday_aed #9

Open

Description

@caseysoftware

do_holiday_aed.php takes user_id (L51) and holiday_annual (L14) from POST without casting. HolidayFunctions::storeRecords() puts them straight into its WHERE clause:

$where.= " AND holiday_user=".$user;
$where.= " AND holiday_annual=".$annual;

Files: do_holiday_aed.php L14, L51; holiday_functions.class.php L412–414 ($userid is also interpolated at L93, L186, L310)

Fix: cast to int at the handler and in storeRecords() / the $userid queries.

Evidence: found by reading the code against master; not reproduced on a running install.
Effort: XS

Part of #1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsecurityweb2project 5.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions