<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yukta31</title>
    <description>The latest articles on DEV Community by yukta31 (@yukta31).</description>
    <link>https://dev.to/yukta31</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3936950%2F6edfa542-129d-4606-bad0-5031a5659e5c.png</url>
      <title>DEV Community: yukta31</title>
      <link>https://dev.to/yukta31</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yukta31"/>
    <language>en</language>
    <item>
      <title>CVE-2025-55315: How a Parser Bug in ASP.NET Core Enabled HTTP Request Smuggling</title>
      <dc:creator>yukta31</dc:creator>
      <pubDate>Sun, 17 May 2026 23:59:59 +0000</pubDate>
      <link>https://dev.to/yukta31/cve-2025-55315-how-a-parser-bug-in-aspnet-core-enabled-http-request-smuggling-5dod</link>
      <guid>https://dev.to/yukta31/cve-2025-55315-how-a-parser-bug-in-aspnet-core-enabled-http-request-smuggling-5dod</guid>
      <description>&lt;p&gt;Earlier this year, a vulnerability was disclosed in ASP.NET Core's &lt;br&gt;
Kestrel HTTP server — CVE-2025-55315. As part of my coursework in &lt;br&gt;
SWE-681 at George Mason University, my teammate Sehaj Gill and I &lt;br&gt;
analyzed this vulnerability and proposed a formal case study for &lt;br&gt;
MITRE's public secure coding repository.&lt;/p&gt;

&lt;p&gt;Here's a technical breakdown of what went wrong, how it could be &lt;br&gt;
exploited, and how it was fixed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is HTTP Request Smuggling?
&lt;/h2&gt;

&lt;p&gt;HTTP Request Smuggling is an attack that exploits disagreements between &lt;br&gt;
two servers — typically a reverse proxy and an origin server — about &lt;br&gt;
where one HTTP request ends and the next begins.&lt;/p&gt;

&lt;p&gt;When a proxy forwards traffic to a backend server, both need to agree &lt;br&gt;
on message boundaries. If they parse the same request differently, an &lt;br&gt;
attacker can "smuggle" a malicious request hidden inside a legitimate &lt;br&gt;
one — bypassing security controls, poisoning shared caches, or &lt;br&gt;
hijacking other users' sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Coding Mistake in Kestrel
&lt;/h2&gt;

&lt;p&gt;Kestrel is ASP.NET Core's built-in HTTP server. The vulnerability was &lt;br&gt;
rooted in how Kestrel parsed chunked HTTP request bodies.&lt;/p&gt;

&lt;p&gt;In chunked transfer encoding, each chunk must be terminated with CRLF &lt;br&gt;
(\r\n) as required by RFC 9112. Kestrel's parser was permissive — it &lt;br&gt;
accepted malformed chunk-extension line endings that did not strictly &lt;br&gt;
enforce this CRLF requirement.&lt;/p&gt;

&lt;p&gt;This single parsing decision created a differential between Kestrel &lt;br&gt;
and upstream reverse proxies. The proxy would parse the request one &lt;br&gt;
way. Kestrel would parse it another way. That gap is exactly where &lt;br&gt;
request smuggling lives.&lt;/p&gt;

&lt;p&gt;The vulnerable code was in &lt;code&gt;Http1ChunkedEncodingMessageBody.cs&lt;/code&gt; — &lt;br&gt;
the file responsible for parsing chunked request bodies in Kestrel's &lt;br&gt;
HTTP/1.1 pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Attack Works
&lt;/h2&gt;

&lt;p&gt;An attacker sends a carefully crafted HTTP request with malformed &lt;br&gt;
chunk-size line endings — using bare LF instead of CRLF.&lt;/p&gt;

&lt;p&gt;The reverse proxy normalizes it and forwards it to Kestrel as one &lt;br&gt;
request. But Kestrel's permissive parser interprets the boundaries &lt;br&gt;
differently — seeing two requests where the proxy saw one.&lt;/p&gt;

&lt;p&gt;The "second" request — the smuggled one — is now sitting in Kestrel's &lt;br&gt;
pipeline, processed as if it came from the next legitimate user. &lt;br&gt;
Depending on the application, this can lead to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security control bypass&lt;/li&gt;
&lt;li&gt;Cache poisoning&lt;/li&gt;
&lt;li&gt;Session hijacking&lt;/li&gt;
&lt;li&gt;Unauthorized access to other users' data&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Fix — PR #64037
&lt;/h2&gt;

&lt;p&gt;The fix was committed in PR #64037 in the dotnet/aspnetcore repository. &lt;br&gt;
Three key changes were made:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Strict CRLF enforcement&lt;/strong&gt;&lt;br&gt;
The parser now strictly rejects chunk-size lines that do not terminate &lt;br&gt;
with CRLF as required by RFC 9112. Bare LF and bare CR are no longer &lt;br&gt;
accepted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Fail-closed error handling&lt;/strong&gt;&lt;br&gt;
Malformed framing now returns HTTP 400 Bad Request immediately. The &lt;br&gt;
old behavior normalized or forwarded ambiguous input — the new behavior &lt;br&gt;
rejects it hard. This is the fail-closed principle: when in doubt, &lt;br&gt;
refuse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Negative regression tests&lt;/strong&gt;&lt;br&gt;
The fix added dedicated tests for malformed line terminators and chunk &lt;br&gt;
extensions. These tests verify that malformed input is rejected — not &lt;br&gt;
just that valid input is accepted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prevention Principles
&lt;/h2&gt;

&lt;p&gt;This vulnerability illustrates several universal secure coding &lt;br&gt;
principles:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strict RFC conformance over permissive parsing&lt;/strong&gt;&lt;br&gt;
Be a strict reader, lenient writer. Parse input exactly as the spec &lt;br&gt;
requires. Any deviation from the spec is potential ambiguity — and &lt;br&gt;
ambiguity between components is where smuggling attacks live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fail-closed design&lt;/strong&gt;&lt;br&gt;
Malformed input should fail loudly and immediately. Never normalize, &lt;br&gt;
forward, or silently accept input that violates protocol rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parser-differential testing&lt;/strong&gt;&lt;br&gt;
If your system sits behind a proxy or load balancer, test how both &lt;br&gt;
components parse the same edge-case inputs. A differential is a &lt;br&gt;
vulnerability waiting to be exploited.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Negative test coverage&lt;/strong&gt;&lt;br&gt;
Your test suite should verify what your parser REJECTS, not just what &lt;br&gt;
it accepts. Malformed inputs, boundary violations, and protocol &lt;br&gt;
deviations all need explicit negative tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;HTTP Request Smuggling is not a niche attack. It has been used to &lt;br&gt;
bypass WAFs, hijack sessions on major platforms, and escalate &lt;br&gt;
server-side request forgery vulnerabilities. &lt;/p&gt;

&lt;p&gt;A single permissive line in a parser — accepting bare LF where CRLF &lt;br&gt;
was required — was enough to open the door.&lt;/p&gt;

&lt;p&gt;The lesson: security vulnerabilities often live in the gap between &lt;br&gt;
what the spec says and what the implementation accepts. Strict &lt;br&gt;
parsing, fail-closed design, and comprehensive negative testing are &lt;br&gt;
not optional — they are the baseline.&lt;/p&gt;




&lt;p&gt;This case study was proposed to MITRE's secure coding case studies &lt;br&gt;
repository as part of SWE-681 at George Mason University.&lt;/p&gt;

&lt;p&gt;Full proposal: github.com/mitre/secure-coding-case-studies/issues/72&lt;br&gt;&lt;br&gt;
CVE reference: CVE-2025-55315&lt;/p&gt;

</description>
      <category>security</category>
      <category>dotnet</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I Built an AI Knowledge Engine for My University Using RAG</title>
      <dc:creator>yukta31</dc:creator>
      <pubDate>Sun, 17 May 2026 23:52:18 +0000</pubDate>
      <link>https://dev.to/yukta31/how-i-built-an-ai-knowledge-engine-for-my-university-using-rag-5a74</link>
      <guid>https://dev.to/yukta31/how-i-built-an-ai-knowledge-engine-for-my-university-using-rag-5a74</guid>
      <description>&lt;p&gt;When I started my MS CS program at George Mason University, I noticed &lt;br&gt;
a frustrating problem — finding accurate information about GMU &lt;br&gt;
policies, deadlines, and resources meant digging through dozens of &lt;br&gt;
scattered web pages. So I built GMU SmartPatriot, an AI-powered &lt;br&gt;
knowledge engine that answers student questions by pulling from 200+ &lt;br&gt;
real GMU web pages.&lt;/p&gt;

&lt;p&gt;Here's exactly how I built it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Basic Chatbots
&lt;/h2&gt;

&lt;p&gt;A regular chatbot just generates text based on training data. Ask it &lt;br&gt;
about GMU's Spring 2026 registration deadline and it will either &lt;br&gt;
hallucinate an answer or say it doesn't know. Neither is useful.&lt;/p&gt;

&lt;p&gt;The solution is RAG — Retrieval Augmented Generation. Instead of &lt;br&gt;
relying on the LLM's memory, you give it real, verified documents to &lt;br&gt;
read before answering. The answer is grounded in actual source &lt;br&gt;
material, not generated from thin air.&lt;/p&gt;

&lt;h2&gt;
  
  
  How RAG Works (Simply)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scrape&lt;/strong&gt; — collect your source documents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Index&lt;/strong&gt; — store them in a searchable format&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieve&lt;/strong&gt; — when a user asks a question, find the most relevant 
documents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate&lt;/strong&gt; — pass those documents + the question to an LLM and 
let it answer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. The LLM becomes a reader, not a guesser.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built With
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cheerio&lt;/strong&gt; — for scraping 200+ GMU web pages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js + Next.js&lt;/strong&gt; — backend and frontend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Groq API (llama-3.1)&lt;/strong&gt; — for fast LLM inference, free tier&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt; — serverless deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt; — type safety throughout&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Scraping Challenge
&lt;/h2&gt;

&lt;p&gt;The first problem was data collection. GMU's website has hundreds of &lt;br&gt;
pages across different departments — academic calendars, financial aid, &lt;br&gt;
housing, IT support, and more.&lt;/p&gt;

&lt;p&gt;I used Cheerio to scrape and parse HTML, extracting clean text from &lt;br&gt;
each page. The tricky part was handling inconsistent page structures — &lt;br&gt;
some pages used tables, others used lists, others were just paragraphs. &lt;br&gt;
I wrote a preprocessing step to normalize everything into clean chunks &lt;br&gt;
of text.&lt;/p&gt;

&lt;p&gt;The result: a structured knowledge base of 200+ pages, ready to query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the Retrieval Pipeline
&lt;/h2&gt;

&lt;p&gt;For retrieval, I used keyword-based search combined with semantic &lt;br&gt;
matching. When a user asks a question:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Extract key terms from the question&lt;/li&gt;
&lt;li&gt;Search the knowledge base for relevant chunks&lt;/li&gt;
&lt;li&gt;Rank results by relevance&lt;/li&gt;
&lt;li&gt;Pass top 3-5 chunks to the LLM as context&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the core of RAG — the quality of your retrieval directly &lt;br&gt;
determines the quality of your answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conversation Memory
&lt;/h2&gt;

&lt;p&gt;One thing basic RAG implementations miss is memory. If a user asks &lt;br&gt;
"What are the registration deadlines?" then follows up with "What &lt;br&gt;
about for graduate students?" — a memoryless system loses context &lt;br&gt;
on the second question.&lt;/p&gt;

&lt;p&gt;I implemented a sliding window memory of 5-7 turns. Each new question &lt;br&gt;
gets the last N exchanges as context, so the conversation feels natural &lt;br&gt;
and continuous.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Response latency under 2 seconds&lt;/li&gt;
&lt;li&gt;Answers grounded in real GMU content&lt;/li&gt;
&lt;li&gt;No hallucinations about university-specific information&lt;/li&gt;
&lt;li&gt;Multi-turn conversation that maintains context&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ground your LLM.&lt;/strong&gt; Ungrounded LLMs are confident and wrong. RAG &lt;br&gt;
makes them confident and right — as long as your source data is &lt;br&gt;
accurate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retrieval quality matters more than model quality.&lt;/strong&gt; A great &lt;br&gt;
retrieval step with a small model beats poor retrieval with a large &lt;br&gt;
model every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chunking is an art.&lt;/strong&gt; How you split your documents into chunks &lt;br&gt;
significantly affects retrieval quality. Too small and you lose &lt;br&gt;
context. Too large and you overwhelm the LLM's context window.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm currently exploring vector embeddings for semantic search to &lt;br&gt;
replace keyword matching — this will significantly improve retrieval &lt;br&gt;
accuracy for complex questions.&lt;/p&gt;

&lt;p&gt;The code is on GitHub: github.com/yukta31&lt;/p&gt;

&lt;p&gt;If you're building something similar or want to discuss RAG &lt;br&gt;
architectures, connect with me on LinkedIn.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>python</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
