feat(haystack): add Serialization Boundary Evasion sandbox, interactive trainer, and tutorial (JDP-2026-005) - #61
Open
JDP-Security wants to merge 2 commits into
Conversation
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.
Summary
Adds a complete containerized lab environment, interactive CLI trainer, exploit payloads, and documentation demonstrating the Haystack Serialization Boundary Evasion vulnerability (JDP-2026-005) in
haystack-ai v2.27.0.This module aligns with OWASP LLM06 (Excessive Agency) and OWASP ASI02 (Tool Misuse), demonstrating how unvalidated
init_parametersindefault_from_dict()allow an untrusted YAML pipeline payload to mutateunsafe=Falsetounsafe=Trueand achieve persistent Remote Code Execution (RCE).What's Included
Local Sandbox (
sandboxes/agentic_local_haystack/)server.py) runninghaystack-ai v2.27.0./chat(pipeline deserialization sink) and/verify(integrity verification) endpoints.ContainerfileandMakefile(make clean,make attack).Exploitation & Training Suite (
exploitation/haystack/)interactive_trainer.py: Menu-driven CLI wizard with 6 interactive lessons (Baseline, YAML Bypass, Full RCE, Scope Change, Mitigation Limitations, and Attack Vectors) plus--automode.payloads/: Pre-built YAML/JSON exploit definitions forOutputAdapterandConditionalRouter.submission_audit.md: Detailed audit and proof-of-concept validation report.Tutorials & Documentation (
tutorials/&README.md)haystack_orchestration_security_tutorial.md: Comprehensive theoretical break-down, vendor/researcher perspective analysis, and remediation strategies.README.md: Updated index entry linking the Haystack sandbox and trainer suite.Verification & Testing
make -C sandboxes/agentic_local_haystack attack./verifystate returnsclean../exploitation/haystack/interactive_trainer.py --auto.unsafeflag bypass, Jinja2 SSTI execution, and persistent framework compromise viahaystack/__init__.pyoverwrite.