Skip to content

Fix SQL injection in EventEditor.php via EID parameter#7684

Merged
DawoudIO merged 2 commits intomasterfrom
fix/issue-6854-eventeditor-sqli
Nov 30, 2025
Merged

Fix SQL injection in EventEditor.php via EID parameter#7684
DawoudIO merged 2 commits intomasterfrom
fix/issue-6854-eventeditor-sqli

Conversation

@DawoudIO
Copy link
Contributor

What Changed

Add InputUtils::filterInt() sanitization to EID parameter from both GET and POST requests. The unsanitized EID was being directly concatenated into SQL queries, allowing SQL injection attacks.

Fixes #6854

Type

  • ✨ Feature
  • 🐛 Bug fix
  • ♻️ Refactor
  • 🏗️ Build/Infrastructure
  • 🔒 Security

Testing

Screenshots

Security Check

  • Introduces new input validation
  • Modifies authentication/authorization
  • Affects data privacy/GDPR

Code Quality

  • Database: Propel ORM only, no raw SQL
  • No deprecated attributes (align, valign, nowrap, border, cellpadding, cellspacing, bgcolor)
  • Bootstrap CSS classes used
  • All CSS bundled via webpack

Pre-Merge

  • Tested locally
  • No new warnings
  • Build passes
  • Backward compatible (or migration documented)

Add InputUtils::filterInt() sanitization to EID parameter from both
GET and POST requests. The unsanitized EID was being directly
concatenated into SQL queries, allowing SQL injection attacks.

Fixes #6854
Copilot AI review requested due to automatic review settings November 30, 2025 00:32
@DawoudIO DawoudIO requested a review from a team as a code owner November 30, 2025 00:32
@DawoudIO DawoudIO requested review from DAcodedBEAT, MrClever, bigtigerku, grayeul and respencer and removed request for a team November 30, 2025 00:32
Sanitize EventCount[] and EventCountNotes POST parameters in the
ON DUPLICATE KEY UPDATE clause of eventcounts_evtcnt INSERT statements.
The INSERT VALUES were already sanitized but the UPDATE clause used
raw unsanitized values, allowing SQL injection via the attendance
count fields.

Applied InputUtils::legacyFilterInput() consistently to both the
INSERT and UPDATE portions of the query.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a SQL injection vulnerability in EventEditor.php by sanitizing the EID parameter from both GET and POST requests using InputUtils::filterInt(). The unsanitized EID was being directly concatenated into SQL queries at line 231, creating a security risk.

Key Changes

  • Applied InputUtils::filterInt() to $_GET['EID'] (line 34)
  • Applied InputUtils::filterInt() to $_POST['EID'] (line 37)

@DawoudIO DawoudIO merged commit 1ca7109 into master Nov 30, 2025
7 checks passed
@DawoudIO DawoudIO deleted the fix/issue-6854-eventeditor-sqli branch November 30, 2025 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security Bug: SQL Injecton - Event Editor

2 participants