You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TagResource does not validate tag key and value characters #444
handle_tag_resource in crates/engine/src/tagging.rs checks that the resource ARN is non-empty and well-formed through validate_resource_arn, then stores the tags. It applies no character or length validation to the tag keys or values.
What DynamoDB does
Measured on 2026-10-22 with TagResource on a table:
A key with ! or # returns ValidationExceptionThe Tag Key provided is invalid, Key: <key>. A value with ! returns The Tag Value provided is invalid, Value: <value>.
A key of 128 characters is accepted and one of 129 is rejected with the same key message. A value of 256 characters is accepted and one of 257 is rejected with the value message.
A key starting with aws: returns ValidationExceptionTag Key cannot be prefixed with aws:, Key: <key>.
A key and value using letters, digits, spaces and _ . : / = + - @ are accepted.
Effect
ExtendDB stores tag keys and values that the service rejects at write. A tag that cannot exist on the service can be created on ExtendDB, so a policy that conditions on such a tag behaves differently between the two.
Suggested fix
Validate tag keys and values in handle_tag_resource with the rules and messages above. Non-ASCII letters were not measured, so the allowed set for them still needs a measurement.
Two more measurements for this one (us-east-1, 2026-10-26, 3 of 3 each): TagResource with Key: "" on an ACTIVE table answers 400 ValidationExceptionThe Tag Key provided is invalid, Key: (a trailing space after the colon, then nothing), and the same request while the table is DELETING answers the same ValidationException, not the Table is being deleted refusal that a valid tag gets there (#551). So the service validates the tag before it checks the table's status; when the validation lands here it goes before the DELETING refusal that #599 adds.
Activity
LeeroyHannigan commentedon Oct 26, 2026
Two more measurements for this one (us-east-1, 2026-10-26, 3 of 3 each):
TagResourcewithKey: ""on anACTIVEtable answers 400ValidationExceptionThe Tag Key provided is invalid, Key:(a trailing space after the colon, then nothing), and the same request while the table isDELETINGanswers the sameValidationException, not theTable is being deletedrefusal that a valid tag gets there (#551). So the service validates the tag before it checks the table's status; when the validation lands here it goes before theDELETINGrefusal that #599 adds.