Multimodal jailbreak datasets in PyRIT

Use JailbreakV-28K, MM-SafetyBench and FigStep with PyRIT to test vision-language models, and understand how remote multimodal loaders cache images.

On this page

Why multimodal jailbreak datasets change what your PyRIT tests cover

A team with text-only red team coverage that now ships a vision-language model has a gap its existing PyRIT runs cannot see. Text objectives test what the model reads as words. An image can carry the same harmful instruction as typography, a diagram or a layout that a text filter never inspects, so a model that refuses every harmful sentence can still follow the same request when it arrives inside a picture. Multimodal datasets exist to test that path. PyRIT can load research sets such as JailbreakV-28K, MM-SafetyBench and FigStep, which the PyRIT documentation lists among the datasets it can load, and each targets harms delivered through images rather than text.

You need these sets when your model accepts image input from users, from documents or from web content, and when your text-only results would otherwise be read as coverage of the whole product. Confirm three things before you run them: that your target endpoint actually accepts image inputs in the format the dataset uses, that the image loader and its caching behavior match your data handling rules, and that your team has agreed which harm categories the images are meant to represent for your application. A refusal rate on image prompts tells you little if the images do not match the harms your users could produce.

PyRIT's datasets span content harms, psychosocial risks and data leakage, and multimodal sets are one input among several. They do not replace text objectives, your own application-specific prompts or the attack strategies you run against the same model. A useful test plan pairs image sets with text sets for the same harm categories, so you can see whether a model's behavior changes when the same objective moves from text to image. Treat the results as evidence about one channel of your model, not a complete measure of its safety.

Dataset options and when each fits

This table compares JailbreakV-28K, MM-SafetyBench, FigStep and similar image sets by harm focus, input form and the target type each suits. Read each row before choosing a set, then check the license column against your own use case before loading anything into PyRIT. The main takeaway is that these sets differ in how the harmful request reaches the model, so the target's input handling matters as much as the topic.

DatasetHarm focus and input formTarget type it suitsWhat to confirm in license and documentation
JailbreakV-28KJailbreak prompts pairing images with text across many harm categoriesVision-language models accepting image and text input togetherLicense terms for research and internal testing, whether images may be redistributed, and the exact category labels
MM-SafetyBenchHarmful requests paired with generated images, covering multiple safety categoriesVision-language models where the image and text carry the request jointlyUsage terms, image provenance, and whether the benchmark authors require citation or restrict commercial use
FigStepHarmful instructions rendered as typographic images with a short text promptModels with strong optical character recognition, where text inside images may bypass text-only filtersSource repository license, any restrictions on the rendered image set, and the intended research scope
Other image sets loaded from PyRITVaries by set; check whether the request sits in the image, the text or bothConfirm the model accepts the modality you plan to sendDataset card, license file, data collection method and any restrictions on hosting copies
Text-only benchmark setsNo image input, so the image pathway is not exercisedText-only chat targets as a baselineNot applicable to image testing, but confirm they cover the harms you need
Image sets built by your teamWritten for your application's visual content and policiesYour deployed multimodal featureInternal ownership, handling of any sensitive content and retention rules
Remote loader image cacheImages fetched and stored locally during a runAny target, but cache location and contents must be controlledStorage location, retention period, access controls and whether cached copies follow the source license

How an image dataset reaches a vision-language model

The path starts at the dataset loader, which reads a built-in multimodal dataset such as JailbreakV-28K, MM-SafetyBench or FigStep. Remote image references are fetched into a local image cache before any request is sent, so the same files are reused across runs. Each prompt then passes through image converters and reaches the vision-language target inside the trust boundary of the model endpoint. Check that the cache location is controlled by your team, and that responses flow into scorers and memory where results can be reviewed.

Image datasets flow through a local cache and converters into the target, then to scoring and memory.

How remote multimodal loaders cache images and what that means for runs

Remote multimodal loaders may download image files from a dataset source and store them in a local cache so that repeat runs do not fetch the same files again. For a red team, the practical effect is that the first run against a large image set takes longer and writes more to disk than later runs, and the cached files persist after the run ends. Before you start a JailbreakV-28K, MM-SafetyBench or FigStep run, confirm in the PyRIT 1.1.0 documentation where the loader writes cached images, whether that location can be set, and whether caching is on by default. The PyRIT documentation 1.1.0 on loading built-in datasets is the natural starting point, and the release notes for the version you install should be checked for any change to cache behavior.

Caching changes three things you need to plan for. The first is storage location: a cache in a developer's home directory on a shared test host is a different risk from a cache on an encrypted volume that the security team controls. The second is disk use: image sets of this kind can be large, and a cache that grows across many dataset versions can fill a build agent or a shared workstation. Ask the team that owns your environment how much space the image sets need and set a quota or cleanup job before the first scheduled run. The third is data handling. Cached images may include harmful content that the datasets exist to test, so they should be treated as sensitive material, restricted by access controls and excluded from backups and general file shares unless your policy says otherwise.

Clearing the cache is a decision, not a side effect. Removing cached files forces a fresh download on the next run, which can change timing and may fetch a different version of a remote file if the source has changed, so record which dataset version each result came from. Before you delete anything, confirm the cache path and the removal procedure in the PyRIT documentation for your version, and make sure attack results stored in memory do not depend on files you are about to remove. Put the cache location, retention period and cleanup owner in your test runbook so that an auditor or incident responder can trace where the images used in a result came from.

Setting up a multimodal dataset run in PyRIT

This sequence takes a team from a clean environment to one verified run of a multimodal jailbreak dataset against a vision-language target. The output is a small, inspected run with cached images, scorer results and memory records that show exactly what was sent and returned.

  1. Install PyRIT on a supported Python version

    Create a virtual environment on a supported Python version and install the package with pip. The PyPI package supports Python 3.10 up to but not including 3.15, and the PyRIT documentation recommends Python 3.13, so pick 3.13 unless your platform team requires otherwise. Confirm the installed version with pip show and note it in your run record, because dataset loaders and scorers change between releases. Done means the package imports cleanly in a Python shell.

  2. Configure the target and credentials

    Create the user settings files PyRIT reads: credentials go in ~/.pyrit/.env and general settings go in ~/.pyrit/.pyrit_conf. Declare one vision-language target, such as a hosted model endpoint your organization has approved, and keep API keys out of the configuration files you commit to source control. Confirm with your security team where keys are stored and who can read them. Done means a minimal test prompt sent to the target returns a response, which proves the endpoint and key work before any multimodal data is involved.

  3. Load one multimodal dataset with a small sample

    Load one image-based dataset from PyRIT's built-in catalog, such as JailbreakV-28K, MM-SafetyBench or FigStep, and cap the run to a small number of objectives. PyRIT documentation lists these as research datasets it can load, and the loading guide describes the parameters for selecting and limiting them. Review the first few loaded objectives by hand to confirm they match the harm categories you intend to test. Done means a short list of objectives and image references is in memory with the dataset name attached.

  4. Verify images load and cache

    Check that the remote image loaders fetch each referenced image, store it in the local cache and reuse the cached copy on later reads. Open a few cached files directly and confirm they are valid images, then re-run the load and confirm the cache is used rather than fetched again. Record the cache location, because it will hold research content that your data handling rules may govern. Done means every sampled image opens, and a second load produces no new downloads for the same items.

  5. Run one vision-language target

    Send the sampled multimodal prompts to the configured target using a single-turn attack, starting with one or two objectives so failures are easy to read. Keep concurrency low for the first run and watch for errors from the endpoint, such as rejected image formats or size limits. Read the raw responses for a few items to confirm the image and text reached the model. Done means each sampled objective has a recorded response or a recorded error.

  6. Check scorer output

    Apply the scorer you chose to each response and read the scores alongside the responses they judged. A scorer can mark a refusal as a success or miss a harmful image-based answer, so check several results by hand, especially disagreements. Note any scorer that cannot see the image content, since that limits what its verdicts mean for multimodal tests. Done means you can state, for the sample, how often your reviewed verdicts agreed with the scorer.

  7. Confirm memory records

    Query PyRIT memory to confirm that each conversation, image reference, response and score was stored with the dataset and target that produced it. The memory backend is SQLite or Azure SQL, and records should let you trace a single finding back to its prompt, image and model response. Export one conversation for review to confirm the chain is complete. Done means a reviewer who was not in the run can follow one objective from dataset entry to scored result.

Security and handling risks for image jailbreak data

Image jailbreak datasets contain deliberately harmful visual content, and PyRIT stores what it sends and receives. The cards below cover where that material lands on disk, how credentials and endpoints are configured, what memory retains, and how to report a vulnerability in PyRIT itself.

Harmful image content on analyst machines

Datasets such as JailbreakV-28K, MM-SafetyBench and FigStep include images designed to elicit unsafe outputs, so the files are sensitive even when no one reads the model's replies. Download and inspect them on machines and storage that your data handling policy covers. Confirm with your security team who may open these files, where copies may sit, and how they are removed after testing ends.

Image caches created by remote loaders

Remote multimodal loaders can write downloaded images to a local cache so later runs do not fetch them again. Each cached copy is a second location for harmful content, and it outlives the run that created it. Ask which cache directory your PyRIT version uses, include it in your retention and deletion procedure, and confirm that it is excluded from shared backups and synchronized folders.

Credentials in the settings files

PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf. On a shared analyst workstation, a plaintext key in these files can reach anyone with access to the account. Restrict file permissions to the tester, use separate keys for test targets, rotate them after engagements, and avoid committing these files to repositories or copying them into test images.

Scoping target endpoints

A misconfigured target can send harmful image prompts to a production model or a third-party service that you do not own. Before each run, confirm the endpoint, model name and environment in the target configuration match the approved test scope. Use a staging or dedicated test deployment where possible, and record which endpoint each run used so the evidence can be traced later.

Conversation retention in memory

PyRIT stores conversations and results in SQLite or Azure SQL, so prompts, harmful images and model responses persist after a run. Decide the retention period, who can query the memory database, and how it is backed up or deleted. Treat the memory store as sensitive data in its own right, and check whether an auditor will need these records or whether they should be purged after findings are written up.

Reporting PyRIT vulnerabilities

If you find a security flaw in PyRIT itself, report it privately through the Microsoft Security Response Center under the project's security policy rather than opening a public issue. Public disclosure could expose users who run the same version. Keep a record of the version tested and the steps to reproduce, and confirm the current reporting route in the repository README before you submit.

PyRIT repository

Questions teams ask before running multimodal jailbreak tests

Can one engineer run multimodal jailbreak tests with PyRIT?

Yes, a single engineer with Python experience and access to the target can run a first pass, but the work is rarely just running code. The engineer must install PyRIT, load a dataset, point a target at the vision-language model, and set up scoring. Someone else still has to review the outputs, because automated scores miss harmful content and produce false positives. Plan for a second reviewer, even a part-time one, before treating the results as findings. The package supports Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13, so confirm your interpreter version first.

What does the team need to supply before the first run?

Most of the prerequisites sit with your team, not the test tooling. Four items matter most:

  • Target access: an endpoint for the vision-language model or application, with credentials and a rate limit your environment can support.
  • Storage: space for downloaded images, cached image files and the PyRIT memory database, which stores conversations and results in SQLite or Azure SQL.
  • Reviewers: named people who can read flagged outputs and decide whether they are real failures.
  • Approval: written permission from the model owner to send adversarial images to the system, and a plan for handling any harmful output.

Confirm dataset licenses and terms of use with each dataset's publisher before redistributing images inside your organization.

How long does a first multimodal jailbreak run take?

Duration depends on three variables: sample size, how many prompt and image pairs each objective produces, and the response time of your target. Each prompt is a model call, and multimodal calls are often slower than text. Scoring adds another call per response if you use an LLM judge. Start with a small sample from each dataset, measure the time per attempt on your own target, and then scale up. The public documentation does not supply a general duration, so measure it in your environment and ask any partner to quote from that measurement.

What drives the cost of multimodal jailbreak testing?

The costs fall into two groups. Recurring costs include model usage on the target and on any judge model, storage for images and memory, and compute to run the tests. One-time costs include setup, writing the test configuration, and building the review process. Review time is often the largest line item, because every flagged output needs a human decision. Costs rise with sample size, the number of attack variants per image, and the number of target versions you retest after changes. Ask any quote to separate model usage, engineering time, review time and retesting.

Which multimodal datasets should we start with?

Start with the datasets that match the harms your application can produce. The PyRIT documentation lists JailbreakV-28K, MM-SafetyBench and FigStep among the research datasets it can load. Each one targets a different style of image-based attack, so running one dataset gives you a narrow picture. Review each dataset's license and the harm categories it covers before you load it. The PyRIT dataset loading guide explains how to load these sets.

Why does image caching matter for remote multimodal loaders?

Remote loaders fetch each image from its source, and repeated runs can download the same files many times. A local cache stores those images so later runs reuse them, which saves bandwidth and makes results easier to reproduce. The cache also holds files that may contain sensitive or harmful content, so it needs the same access controls and retention rules as your test data. Confirm the cache location, its size limits and how it is cleared before you run a full sample.

When should we bring in outside help for multimodal jailbreak tests?

Bring in outside help when the test needs to produce evidence that others will rely on, when your team lacks someone to review harmful outputs, or when the target is a customer-facing product with a short release window. DeployOpen plans and runs fixed-scope AI red teaming engagements inside your own infrastructure, including testing of AI systems and agents, with scope, deliverables and timelines agreed in writing before work starts. DeployOpen does not issue audit reports or certifications, so independent assessors remain necessary if you need formal attestation. Ongoing retesting is available as a retainer.

How DeployOpen scopes multimodal red teaming with PyRIT

Every DeployOpen engagement starts with a written scope that names the vision-language models under test, the image datasets that apply to them, and the harms the client cares about. For multimodal work, that means deciding early whether JailbreakV-28K, MM-SafetyBench, FigStep or another image set matches the content categories the client's product can produce. The scope also records which deployment is in play, whether a hosted endpoint, a custom HTTP application or a self-hosted model, because that choice determines how image payloads reach the target and what must be configured in the client's environment before any test runs.

DeployOpen then sets up PyRIT inside the client's own infrastructure, including its credentials in ~/.pyrit/.env, its settings in ~/.pyrit/.pyrit_conf and a memory store that the client's security team can inspect. Dataset selection follows the agreed harms, not the largest available set. Image-based prompts can be expensive to send and slow to score, so the team confirms sample sizes and which image caching behavior applies with the client before testing begins. Test runs are then reviewed by a person who checks whether the scorer's verdicts match the actual model outputs, since image content can be mislabeled by automated judges.

Most engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope. DeployOpen does not publish a price list, so the factors to request in a quote are the number of target models, the number of image datasets and harm categories, the deployment environments to configure, and whether a retest is included. Findings are delivered with reproduction steps and recommended fixes, followed by a retest of the fixed behavior. Ask whether the retest is part of the fixed scope or a separate retainer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.