Assuming ColdFusion 10,0,13,287689 and Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production.
With this example...
<cfquery name="q" datasource="ds"> update someTable set #form.col#label = <cfqueryparam cfsqltype="cf_sql_varchar" value="#x#"> where id = <cfqueryparam cfsqltype="cf_sql_decimal" value="#id#"> </cfquery> Also assuming there is no data validation checking on #form.col#, how could this be exploited? Obviously they could cause the query to fail with an invalid column, but I don't see any way something more malicious could be done since multiple statements cannot be ran in a single <cfquery>. So something like this does not work...
#form.col#:
id = 1; delete from users; --comment everything else out... I'm aware that with SELECTs it's easier to exploit using unions to get data you're not authorized to see, but I'm curious about this specific update statement.
public_column = (SELECT badly_encrypted_password FROM users WHERE username='admin' ), <original_value>- then a later SELECT can be used to obtain the hash for the attacker to bruteforce/etc.