Discovering a CRLF Injection Vulnerability: My Journey into the MSRC Blog Website

#IbrahimXSS
4 min readJun 14, 2024

--

The Beginning

One quiet afternoon, I found myself exploring various Microsoft domains, driven by a curiosity to uncover hidden vulnerabilities. This time, I decided to delve into the Microsoft Security Response Center (MSRC) Blog website: https://msrc-blog.microsoft.com/. Little did I know, this exploration would reveal a significant CRLF injection vulnerability.

The Exploration

Navigating to the MSRC Blog

I started my journey by visiting the MSRC Blog website. Here’s how I uncovered the vulnerability:

  1. Visit the Link:

Navigate to https://msrc-blog.microsoft.com/

Injecting the Payload:

  • I injected the payload %0aSet-Cookie:whoami=ibro into the HTTP request headers of the MSRC Blog website.

Observing the Response:

  • I observed the server response to confirm the successful injection of the crafted header.
  • I verified that the Set-Cookie header with the value whoami=ibro was present in the server response.
https://msrc-blog.microsoft.com/%0aSet-Cookie:whoami=ibro

The Discovery

CRLF Injection Vulnerability

A CRLF (Carriage Return Line Feed) injection vulnerability was identified in the header of the MSRC Blog website. This vulnerability allows an attacker to inject arbitrary HTTP response headers, potentially leading to various attacks such as session fixation or cross-site scripting (XSS).

Vulnerability Details:

  • Affected Domain: https://msrc-blog.microsoft.com
  • Vulnerability Type: CRLF Injection
  • Severity: Medium
  • CVE ID: (To be assigned by MSRC Team)
  • Affected Component: HTTP Response Header Handling
  • Exploitability: Moderate

Description:

The vulnerability exists in the handling of user-supplied input in the HTTP response headers of the MSRC Blog website. By injecting a CRLF sequence (%0a) followed by a crafted header such as Set-Cookie:whoami=ibro, an attacker can manipulate the HTTP response sent by the server. This allows the attacker to set arbitrary cookies in the user's browser, potentially leading to session fixation attacks or other malicious activities.

Impact:

The CRLF injection vulnerability in the MSRC Blog website could be exploited by attackers to perform various malicious activities, including session hijacking, cookie manipulation, or XSS attacks. Successful exploitation of this vulnerability may result in unauthorized access to user accounts, sensitive information leakage, or further compromise of the website’s security.

Potential Exploitation Scenarios:

  1. XSS via Cookie: If the value of the cookie is reflected somewhere without output encoding.
  2. Bypass Double Submit Cookie CSRF Protection: If an application uses this solution as CSRF protection.
  3. Session Fixation: If an application is not renewing the session cookie (e.g., JSESSIONID) after login.

Escalation of the Vulnerability

I was able to further escalate this CRLF injection vulnerability. By manipulating the headers, I could inject my text content into the webpage, creating a content spoofing scenario. This allowed me to inject new headers, inject any text, stop redirections, and overwrite the status of the response. These actions demonstrated the critical nature of the vulnerability and its potential impact.

Conclusion

My journey into the MSRC Blog website highlighted the importance of continuous security assessments. By leveraging my skills and expertise, I uncovered a CRLF injection vulnerability that could have far-reaching consequences for Microsoft and its users. Through detailed testing and validation, I was able to demonstrate the severity of the issue and provide comprehensive recommendations for remediation.

By addressing these issues promptly, Microsoft can enhance the security of its applications, protect its users, and maintain trust in its brand. For further clarity, I have attached images and videos illustrating the exploitation of these vulnerabilities. If you have any questions or require additional information, feel free to contact me on my Linkedin profile:

https://www.linkedin.com/in/ibrahim-husi%C4%87-101430102/

Proof of Concept:

--

--

#IbrahimXSS

Deploying an alert box in a web app is like having a tiny pop-up comedian shout 'Surprise!' whenever you least expect it! https://ibrahimxss.store/