Skip to content
Info disclosure Write-up Beginner

CVE-2025–48432 | Django — Potential log injection via un

Django's log_response() function logged the request path without escaping, allowing attackers to inject control characters and forge log entries. An attacker could send a crafted request to create misleading log lines, such as fake warnings.

Yunus Olçar Follow

Published on medium.com

Hey there! I’ve been on a little mental reset lately — a short break from code and cybersecurity to recharge. 🌿 But now I’m back and ready to shift gears.

Yunus Olçar, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The logging function did not escape user-controlled input before writing it to log files.

Impact

Attackers could forge log entries, potentially misleading security teams and hiding real issues; the vulnerability is low severity and does not directly compromise the system.

What the attacker needed

Ability to send HTTP requests to the server

The fix

The fix escapes string arguments in log messages using unicode_escape and ascii encoding, neutralising control characters.

How it was found

  1. Send a request with a path containing encoded newline characters and a fake log message.
  2. Observe that the log file contains the injected message as a separate line.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When a web application writes information to a log file, it should clean up special characters first. Otherwise, an attacker can sneak in newlines or other control characters to make the log look like it contains fake messages, which can confuse anyone reading the logs.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Yunus Olçar

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.