<?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: seung il,choi</title>
    <description>The latest articles on DEV Community by seung il,choi (@nohosa).</description>
    <link>https://dev.to/nohosa</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4264589%2F2d59e205-9cb1-4b3b-afa7-b7da8b2e709c.png</url>
      <title>DEV Community: seung il,choi</title>
      <link>https://dev.to/nohosa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nohosa"/>
    <language>en</language>
    <item>
      <title>Defending RAG &amp; MCP Agents from White-Text PDF Prompt Injections (Zero-Install Remote SSE)</title>
      <dc:creator>seung il,choi</dc:creator>
      <pubDate>Wed, 25 Nov 2026 11:14:41 +0000</pubDate>
      <link>https://dev.to/nohosa/defending-rag-mcp-agents-from-white-text-pdf-prompt-injections-zero-install-remote-sse-52a6</link>
      <guid>https://dev.to/nohosa/defending-rag-mcp-agents-from-white-text-pdf-prompt-injections-zero-install-remote-sse-52a6</guid>
      <description>&lt;h2&gt;
  
  
  The Silent Attack Vector in Every PDF RAG Pipeline
&lt;/h2&gt;

&lt;p&gt;When an AI agent reads an external PDF—a candidate's resume, a research preprint, or a vendor report—standard text extraction libraries (&lt;code&gt;pypdf&lt;/code&gt;, &lt;code&gt;pdfminer&lt;/code&gt;, &lt;code&gt;pymupdf&lt;/code&gt;) extract &lt;strong&gt;all text objects&lt;/strong&gt; in the content stream, whether a human can see them or not.&lt;/p&gt;

&lt;p&gt;That makes four classic PDF obfuscation techniques trivial to exploit against autonomous agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;White-on-white text&lt;/strong&gt;: Setting fill color to white (&lt;code&gt;1 1 1 rg&lt;/code&gt;, &lt;code&gt;1 g&lt;/code&gt;, or &lt;code&gt;0 0 0 0 k&lt;/code&gt;) on a white page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invisible rendering mode (&lt;code&gt;3 Tr&lt;/code&gt;)&lt;/strong&gt;: A valid PDF operator that tells viewers to neither fill nor stroke the glyphs—yet extractors still emit the string.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Micro-fonts (&lt;code&gt;&amp;lt; 2pt&lt;/code&gt;)&lt;/strong&gt;: Tiny invisible text blocks tucked into page margins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Off-page text&lt;/strong&gt;: Coordinates placed outside the visible &lt;code&gt;CropBox&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How CleanWeb v3.0.1 Neutralizes Hidden PDF Injections
&lt;/h2&gt;

&lt;p&gt;Instead of relying on regexes &lt;em&gt;after&lt;/em&gt; text extraction, CleanWeb tracks the PDF graphics state per text-showing operator (&lt;code&gt;Tj&lt;/code&gt;, &lt;code&gt;TJ&lt;/code&gt;, &lt;code&gt;'&lt;/code&gt;, &lt;code&gt;"&lt;/code&gt;) and drops invisible glyphs before assembling Markdown—then runs a secondary indirect prompt-injection &amp;amp; covert-channel pass that blocks &lt;code&gt;1x1&lt;/code&gt; tracking pixels and parameter-leaking Markdown image URLs (&lt;code&gt;![alt][EXFILTRATION_IMAGE_BLOCKED]&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It in 10 Seconds (No Signup Required)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Option 1: Remote SSE MCP (Cursor / Windsurf / Claude)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"x402-cleanweb"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://x402-cleanweb-agent-7qxtp3324q-du.a.run.app/sse"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Option 2: Python Thin Client / LlamaIndex / LangChain
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install x402-cleanweb-agent
&lt;span class="c"&gt;# or framework integrations:&lt;/span&gt;
pip install langchain-x402-cleanweb
pip install llama-index-readers-x402-cleanweb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Option 3: Instant &lt;code&gt;curl&lt;/code&gt; Test (3 Free Calls Included)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST &lt;span class="s2"&gt;"https://x402-cleanweb-agent-7qxtp3324q-du.a.run.app/api/v1/clean-web"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"X-Agent-Nonce: devto-trial-001"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"url": "https://news.ycombinator.com"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pure M2M x402 Micro-Pricing
&lt;/h2&gt;

&lt;p&gt;No credit card, no API key dashboard, no $49/mo subscription:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web Cleaning (87% token reduction)&lt;/strong&gt;: &lt;code&gt;$0.001 USDC&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sanitized PDF Extraction&lt;/strong&gt;: &lt;code&gt;$0.005 USDC&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supported Networks&lt;/strong&gt;: Base, Polygon, Arbitrum, Solana (x402 protocol)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/nohosa001-pixel/x402-cleanweb-agent" rel="noopener noreferrer"&gt;https://github.com/nohosa001-pixel/x402-cleanweb-agent&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PyPI&lt;/strong&gt;: &lt;a href="https://pypi.org/project/x402-cleanweb-agent/" rel="noopener noreferrer"&gt;https://pypi.org/project/x402-cleanweb-agent/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OpenAPI Docs&lt;/strong&gt;: &lt;a href="https://x402-cleanweb-agent-7qxtp3324q-du.a.run.app/docs" rel="noopener noreferrer"&gt;https://x402-cleanweb-agent-7qxtp3324q-du.a.run.app/docs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>security</category>
      <category>python</category>
    </item>
  </channel>
</rss>
