From Prompt to Pwned Chaining LLM and Web Vulnerabilities to... - #2852
Open
carlospolop wants to merge 1 commit into
Open
carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: http://blog.quarkslab.com/from-prompt-to-pwned-chaining-llm-and-web-bugs-to-admin.html Content Categories: Based on the analysis, this content was categorized under "AI Security > AI Security Methodology, under a new subsection or page titled "Insecure LLM Output Handling and Prompt Injection to XSS"; cross-reference Pentesting Web > XSS, IDOR, and Cookies Hacking". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview and impact
The post documents a vulnerability chain discovered during a real production assessment and reproduced in the FailMed AI medical-assistant lab. It combines unbounded LLM consumption, prompt injection, insecure handling of LLM-generated output, insufficient Content Security Policy protection, insecure JWT cookie attributes, and an Insecure Direct Object Reference (IDOR). The final chain lets an attacker store JavaScript in a chatbot conversation, cause another authe...
🔧 Technical Details
LLM-assisted Markdown exfiltration: If attacker-controlled prompts can influence LLM output that is subsequently rendered as Markdown, instruct the model to generate an external resource such as
. Ask the model to place sensitive context, optionally Base64-encoded, into[DATA]. Rendering the response makes the victim's browser request the attacker-controlled URL, exposing the value in HTTP logs. This applies wherever the model can access sensitive data and remote Markdown resources are not removed, restricted, or safely proxied.LLM output as an XSS sink: An HTML-capable Markdown renderer becomes an XSS sink when it receives attacker-influenced model output without robust sanitization. Prompt injection can make the model emit active markup such as
<iframe src='javascript:alert("Quarkslab")'>. If the renderer accepts the element and CSP does n...🤖 Agent Actions
Plan:
Repository mapping is complete. I’m now checking the closest AI and web-security pages for overlap, citation style, and the best single-file placement before editing.
The existing
AI-Prompts.mdpage is the best fit: it already covers prompt injection, model-output exfiltration, and LLM scanners, while the web pages already document generic Markdown XSS, IDOR, CSP, and cookie semantics. I’ll add only the novel LLM-to-browser chain there and cross-link—not duplicate—the web techniques.The edit is in place and static validation has passed. I’m doing the final book build and diff audit now to catch any mdBook parsing or link regressions.
Updated
src/AI/AI-Prompts.mdwith:Validation passed: internal links, reference numbering, final banner, forbidden-source check, and
git diff --check.mdbookwas unavailable locally, so the full build was skipped.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.