Skip to content

Security: Sophia Inspector Prompt Injection Protection#2888

Closed
MichaelSovereign wants to merge 27 commits intoScottcjn:mainfrom
MichaelSovereign:security-fix/sophia-prompt-injection
Closed

Security: Sophia Inspector Prompt Injection Protection#2888
MichaelSovereign wants to merge 27 commits intoScottcjn:mainfrom
MichaelSovereign:security-fix/sophia-prompt-injection

Conversation

@MichaelSovereign
Copy link
Copy Markdown
Contributor

Summary

This PR fixes a critical prompt injection vulnerability in the Sophia attestation inspector.

Changes

  1. Input Sanitization: Added to clean user-controlled fields (, , , etc.) before they are merged into the LLM prompt. This prevents attackers from hijacking the LLM's instructions via malicious miner names or device strings.
  2. Structural Integrity: Replaced indented JSON with compact separators and stricter truncation to ensure the prompt remains within safe token limits and maintains clear instruction boundaries.
  3. Defense Against Hijacking: Neutralizes attempts to trick Sophia Elya into auto-approving fraudulent hardware fingerprints.

Closes #7448

@MichaelSovereign MichaelSovereign requested a review from Scottcjn as a code owner May 2, 2026 05:27
@github-actions github-actions Bot added size/XL PR: 500+ lines and removed size/XL PR: 500+ lines labels May 2, 2026
@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related tests Test suite changes labels May 2, 2026
@Scottcjn Scottcjn closed this May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants