Logrus, Denial-of-Service Vulnerability, High Severity

Listen to this Post

How the mentioned CVE works:

The vulnerability occurs in the Logrus logging library when using the Entry.Writer() method for logging data. This method provides an io.Writer interface to stream log messages. Internally, it uses a bufio.Scanner to read input from the writer, which has a default token size limit of 64KB. When a single-line payload larger than 64KB is written without newline characters, the scanner fails with a “token too long” error. This error causes the underlying pipe to be closed abruptly. Once the pipe is closed, the Writer() method becomes unusable for any subsequent log entries. As a result, logging functionality is permanently impaired, leading to a denial-of-service condition. The application may become unavailable if it relies on this logging mechanism for critical operations. The issue is exacerbated because the error handling in vulnerable versions does not recover from scanner failures. Patched versions address this by implementing input chunking and robust error handling, allowing the writer to continue functioning even after large payloads are logged. This prevents the DoS scenario by ensuring that scanner errors do not close the writer pipe.
Platform: Logrus
Version: <1.8.3, 1.9.0, 1.9.2
Vulnerability: DoS via Entry.Writer()
Severity: High
date: Dec 4, 2025

Prediction: Patched Dec 4, 2025

What Undercode Say:

Analytics:

bash commands:

go list -m all | grep logrus

go version -m | grep logrus

cat go.mod | grep logrus

codes:

package main

import (

“github.com/sirupsen/logrus”

“bytes”

)

func main() {

log := logrus.New()

entry := log.WithFields(logrus.Fields{})

writer := entry.Writer()

defer writer.Close()

payload := bytes.Repeat([]byte(“a”), 65537)

writer.Write(payload)

}

how Exploit:

Inject large log payloads exceeding 64KB without newlines via Entry.Writer() method to trigger scanner error and close writer pipe, causing logging failure and application DoS.

Protection from this CVE

Update to patched versions: 1.8.3, 1.9.1, or 1.9.3+. Avoid logging large single-line payloads with Entry.Writer(). Implement input chunking manually.

Impact:

Denial-of-service leading to application unavailability, impaired logging functionality, and potential operational disruption.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top