Skip to content

Write-only target can produce a false attack SUCCESS by scoring the request itself #3701

Closed

Description

@romanlutz

Describe the bug

A write-only target returns no model response, but the prompt normalizer returns the outgoing request. PromptSendingAttack can score that request and declare SUCCESS. This makes exported prompts look like evidence of a successful attack.

Steps/Code to Reproduce

  1. Initialize PyRIT with in-memory storage and no default initializers or environment files.
  2. Create a TextTarget and a RegexScorer matching Hello.
  3. Run PromptSendingAttack with objective Hello QA.
  4. Inspect the attack outcome, last response role, automated score, and saved conversation roles.

The deterministic offline reproduction recorded:

AttackOutcome.SUCCESS
automated_score=True
last_response.role=user
stored roles=[user]
assistant messages=0

Expected Results

Keep write-only export behavior, but do not score a sent request as response evidence. A run without a target response should have no response score and an explicitly undetermined outcome.

Actual Results

The request itself matches the objective scorer and the attack is marked SUCCESS despite no assistant response.

Source at the tested revision:

Proposed fix: distinguish successful write-only delivery from a response using an explicit no-response contract, and skip response scoring. Preserve intended request export behavior. Check other attack callers for the same assumption.

Regression coverage: TextTarget plus a scorer matching the outgoing objective must never produce measured SUCCESS; verify the request remains saved and no fabricated assistant response is added.

Screenshots

N/A. The reproduction is SDK-only. Captured artifacts are round1/false-success-repro.py, text-target-false-success.txt, and scenario-offline.txt in the QA archive; these are recovery references, not downloadable attachments.

Versions

Linux, PyRIT 1.2.0.dev0, commit d3446e0. Offline reproduction; no external model calls. Full package version dump not captured.

Activity

  1. shashank03-dev commented on Oct 31, 2026

    @shashank03-dev
    Contributor

    I would like to take this.

    Plan: add an explicit check on PromptNormalizer for the case where it hands back the sent request because a write-only target returned no response. PromptSendingAttack and the other attacks that score objective-target output (multi-prompt, chunked request, red teaming, Crescendo, TAP) will use it to skip scoring and retries, record UNDETERMINED with no last_response, and keep the saved request untouched. Regression tests use TextTarget with a scorer that matches the objective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions