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
CMDB/augments loaders log attacker-influenceable strings unescaped and uncapped #60
Found by an adversarial review of the CMDB branches (#57, #58, #59); nothing here is fixed yet.
CMDB and augments loaders echo attacker-influenceable JSON strings into log lines with %s and no length cap or escaping. Log() formats with StringVFormat, which escapes nothing, and ERR/WARNING lines also reach syslog.
Trigger (host_specific.json, needs CMDB write access): {"vars":{"k":"$(x)\n error: forged line"}} (a JSON \n) prints a second, fake error: line. A value up to the 5 MB HOST_SPECIFIC_DATA_MAX_SIZE is formatted in full.
Existing sites: libpromises/cmdb.c echoes the class value at ERR level on master; #57 adds one more (offending value) and #58 echoes the key at WARNING.
Proposed: one small helper that caps and escapes control characters for logged JSON strings, used by these sites. Separate PR after #57/#58 land on the fork.
Activity