I am engaged on a recursive algorithm utilizing ColdFusion customized tags and I bumped into a wierd bug. Plainly in Adobe ColdFusion 2025 (replace 14 on the time of this writing), should you use attributeCollection to “unfold” a struct right into a customized tag with no different knowledge attributes, any adjustments made to the attributes scope internally to the customized tag get utilized on to the passed-in struct. Which means mutations to the attributes scope can leak into the calling context.
To show, let’s create a ColdFusion customized tag – myTag.cfm – that does nothing however add two keys to the attributes scope:
<cfscript>
// Mutate attributes through oblique param.
param title="attributes.addedViaParam" kind="string" default="Leak";
// Mutate attributes through direct task.
attributes.addedViaAssignment = "Leak";
</cfscript>
Now, let’s invoke this tradition tag twice utilizing the attributeCollection semantics. Within the first invocation, we’ll cross nothing however the given scope. Within the second invocation, we’ll cross the given scope plus a further attribute:
<cfscript>
structA = {};
structB = {};
// ------------------------------------------------------------------------------- //
// ------------------------------------------------------------------------------- //
// AttributeCollection is the ONLY enter to the customized tag.
cfmodule(
template = "./myTag.cfm",
attributeCollection = structA,
);
// AttributeCollection is ONE OF the inputs to the customized tag.
cfmodule(
template = "./myTag.cfm",
attributeCollection = structB,
otherAttribute = "[content]"
);
// ------------------------------------------------------------------------------- //
// ------------------------------------------------------------------------------- //
writeDump( structA );
writeDump( structB );
</cfscript>
In each circumstances, we might count on the writeDump() to lead to an empty struct. Nonetheless, once we run this CFML code, we get the next output:
As you’ll be able to see, the 2 attributes scope mutations within the first invocation have leaked out of the customized tag context and into the struct that was used to supply the customized tag attributes. However, as we are able to see from the second invocation, this solely occurs when the attributeCollection is the one mechanics for offering attribute knowledge.

