[preventative] pre-empting a future possible mass assignment vulnerability

fix: [preventative] pre-empting a future possible mass assignment vulnerability
[preventative] pre-empting a future possible mass assignment vulnerability2cc26f-fix-preventative-pre-empting-a-future-possible-mass-cve-2026-56422fixpreventative pre empting future possible mass

Committed by iglocska

commit message
fix: [preventative] pre-empting a future possible mass assignment vulnerability

Mass-assignment audit Tier B #6 — TemplatesController. Two sink-level
hardenings. NOT exploitable on current code (see below), hence the
preventative tag rather than the [security] sweep title: the fixes
close the sinks so they stay safe regardless of the fragile gate that
currently protects them.
 
add(): calls Template->create()+save() on raw request->data while
forcing org to the caller's org, but never strips id. CakePHP create()
does not strip a supplied primary key, so an injected Template[id] turns
the INSERT into a covert UPDATE that overwrites another org's template
and re-owns it via the forced org (the Servers 00b2e3dae / TagCollections
c80a3533b pattern). perm_template-reachable. Fixed by unset id before
create() (edit() already pins id to the route @53).
 
submitEventPopulation(): saves the reviewed attributes straight from
json_decode(request->data['Template']['attributes']) via a direct
MispAttribute->save with no event_id pin and no id strip. This bypasses
captureAttribute, and only the ROUTE event_id was ACL-checked, so a body
event_id would inject attributes onto an arbitrary event and a body id
would covertly UPDATE an arbitrary attribute (the add_threatconnect
58f637aaa / Events freetext bc182d55d class). perm_add-reachable. Fixed
by pinning event_id to the route-authorised event and unsetting id in
the save loop (checkTemplateAttributes already forces event_id=route in
the review step, so legit flows are unaffected).
 
Why preventative, not [security]: both POST actions are currently
unreachable via REST — the controller's beforeFilter (marked
"// TODO REMOVE") clobbers parent::beforeFilter()'s REST unlockedActions
back to a hardcoded list excluding add/edit/submitEventPopulation, so
REST POSTs are black-holed (verified: /templates/add.json black-holed
while /events/add.json succeeded). On the web path, SecurityComponent
salt-based field-hashing blocks the injection: verified live as a lesser
perm_template user with the fix reverted — a faithful legit add returned
302 and created a row, while the identical request plus an injected
Template[id]=1 was black-holed (HTTP 400) and template 1 was untouched.
submitEventPopulation's tamper target (the attributes field) is a hidden
input, so its value is locked the same way. If a future change removes
the "// TODO REMOVE" beforeFilter clobber as instructed, these actions
become REST-reachable (SecurityComponent off for REST) and both holes
would open — these fixes pre-empt exactly that.
 
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

Editor assessment

This commit patches CVE-2026-56422. The subject, pre-empting a future possible mass assignment vulnerability, never names TemplatesController, and the body runs to several thousand characters explaining why two sinks were hardened despite not being exploitable today. It does carefully document the beforeFilter clobber and SecurityComponent field hashing that currently block the paths, which shows real diligence. But the non-exploitable framing, the preventative label, and the audit tier references make this read like an internal ticket rather than a commit example, and the actual fix is buried near the start. Too much context, too little signal.

Browse categories

More fix examples · Back to search