Coturn
Coturn: Format String Injection via TURN USERNAME/REALM into hiredis Redis Command
Coturn is a free open source implementation of TURN and STUN Server. Prior to 4.13.0, an authenticated TURN user can place printf-style format specifiers in the STUN USERNAME or REALM attribute, which passes is_secure_string() validation and is embedded into Redis keys at nine call sites in src/apps/relay/ns_ioalib_engine_impl.c. send_message_to_redis() in src/apps/relay/hiredis_libevent2.c then passes the attacker-controlled key as the format argument to redisAsyncCommand() while supplying only one variadic value, causing hiredis redisvFormatCommand() to read past the va_list. Exploitation can crash the coturn process and terminate active TURN sessions or disclose stack memory into Redis. This issue is fixed in version 4.13.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 4.13.0
Fixed in 4.13.0
Mitigation
Upgrade coturn to 4.13.0 or later.
References
- Vendor advisory github.com/coturn/coturn/security/advisories/G…
- Patch github.com/coturn/coturn/commit/8fa38032bb4751…
- Release notes github.com/coturn/coturn/releases/tag/4.13.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.