A codec is software or hardware that compresses and decompresses audio or video data so it can be stored, transmitted, and played back efficiently. Compression reduces file size or bandwidth use; decompression reconstructs the media for viewing or listening.
In cybersecurity, codecs matter because they are parsers for complex, often untrusted input. A malicious media file can trigger crashes, memory corruption, excessive CPU or memory use, or logic flaws in the decoder. That makes codecs a common attack surface in media players, browsers, messaging apps, and embedded devices. Defenders reduce risk by keeping codecs patched, limiting supported formats, sandboxing decoders, and validating file structures before processing. On constrained systems, such as older computers or embedded platforms, the security tradeoff is sharper: adding media support expands the trusted computing base, so each decoder must be small, predictable, and resilient.


