Files
opensourcepos/app/Models
Ollama 1f55d96580 Fix mass assignment vulnerability in bulk edit (GHSA-49mq-h2g4-grr9)
The bulk edit function iterated over all $_POST keys without a whitelist,
allowing authenticated users to inject arbitrary database columns (e.g.,
cost_price, deleted, item_type) into the update query. This bypassed
CodeIgniter 4's $allowedFields protection since Query Builder was used
directly.

Fix: Add ALLOWED_BULK_EDIT_FIELDS constant to Item model defining the
explicit whitelist of fields that can be bulk-updated. Use this constant
in the controller instead of iterating over $_POST directly.

Fields allowed: name, category, supplier_id, cost_price, unit_price,
reorder_level, description, allow_alt_description, is_serialized

Security impact: High (CVSS 8.1) - Could allow price manipulation and
data integrity violations.
2026-03-08 22:49:12 +01:00
..
2024-06-15 17:19:15 +02:00
2025-03-28 21:24:21 +04:00