Hijacking 3D Generation: Targeted Adversarial Attacks against Image-to-3D Models via Prefix Trajectory Alignment

Yilong Yang, Jiale Teng, Yule Liu, Yang Liu, Xinlei He, Zhuo MaarXiv 2026

TL;DR

Online Image-to-3D platforms rely on visual content filters at the front door to block users from generating 3D-printable weapons, NSFW figures, or copyrighted characters. This paper demonstrates that you can smuggle those exact restricted 3D shapes right past the guards by hiding adversarial noise inside an image of a plain colored circle. Even better, the authors figure out how to pull this off in black-box commercial services—and show how platforms can catch it before the 3D object finishes rendering.

What Problem Does This Paper Address?

Modern Image-to-3D services turn a single 2D picture into a printable, interactive 3D mesh in minutes. To prevent abuse, services place an automated "inspector" up front to reject unsafe or copyrighted images.

Figure 1. Overview of policy-restricted inspection on Image-to-3D online services. While NSFW contents are denied, PTA3D uses visually benign adversarial images to generate geometry specified by NSFW images. NSFW content is censored for presentation.

There is a fundamental blind spot here: the inspector checks what the 2D input looks like to a human, not what 3D geometry the downstream model will actually build. In theory, an attacker can add tiny pixel perturbations to a harmless image so that its latent representation steers the 3D generator—typically an iterative Diffusion Transformer (DiT)—toward a forbidden 3D target.

In practice, turning this into a working attack against commercial black-box services hits two walls:

  1. Unwieldy optimization: Backpropagating gradients through an entire 50-step DiT generation trajectory and a 3D geometry decoder is computationally brutal and struggles to converge.
  2. Brittle transferability: Commercial platforms resize, compress, crop, and filter uploaded images in secret ways. Adversarial noise tuned to one local open-source model easily breaks when passed through an unknown preprocessing pipeline.

Methods

The authors introduce PTA3D, an offline attack framework built on two core innovations—plus a new defense to counter it:

  • Prefix Trajectory Alignment (PTA): Instead of optimizing across all $N=50$ generation steps, PTA only aligns the first $K=15$ DiT outputs (the "prefix") of the adversarial image with those of the target image. It uses Progressive Cumulative Alignment (expanding the aligned horizon one step at a time as a curriculum) and Direct Image Backpropagation (detaching latent states between steps so gradients flow cleanly straight back to the 2D image encoder rather than multiplying through a long chain of DiT state transitions).
  • Preprocessing Aware Optimization (PAO): Rather than optimizing against a static input pipeline, PAO exposes the adversarial image to random combinations of resizing, rotation, blur, JPEG compression, flipping, and background removal during offline training so the perturbations survive unknown server-side preprocessing.
  • Prefix Similarity Defense (PSD): Wearing their defender hats, the authors train a lightweight MLP classifier to inspect the internal latent state right at the end of the prefix ($K=15$), halting bad generations before running the remaining steps or decoding the 3D mesh.
Figure 3. Overview of the proposed PTA3D framework. Left: Preprocessing Aware Optimization applies a masked perturbation to the benign source image and samples practical input transformations before image encoding. Right: Prefix Trajectory Alignment initializes the target and adversarial trajectories from the same generation state and progressively aligns their DiT outputs from t0 to tK−1. The adversarial states are detached between sampling steps to avoid cross-step backpropagation, while the remaining suffix steps are executed forward only to produce the final 3D output.

Datasets

  • P3DD (Policy-restricted 3D Dataset): A newly introduced benchmark of 130 attacker-specified images across 13 classes in three restricted categories: NSFW objects, physically hazardous structures (e.g., weapons), and copyrighted characters. Each target is paired with a benign source image—a simple circle filled with the target's dominant color.
  • Objaverse & ShapeNet: Two standard 3D repositories (130 sampled images each) used to verify that the attack works on general, complex, and regular 3D geometries alike, not just policy-restricted items.

Key Insights and Ideas

  • 3D geometry crystallizes early: When tracking how a DiT sculpts a 3D object over 50 steps, the core global shape is essentially locked in by step 15! Steps 16–50 just polish local surface details. If you hijack the prefix, the suffix will happily finish sculpting your target even without further supervision.
Figure 2. Geometry formation along the DiT trajectory.
  • Order and location are everything: Aligning only the middle (steps 15–30) or suffix (steps 30–45) yields a 0% attack success rate—once the benign circle's geometry is established in the prefix, later steps cannot reshape it. Similarly, aligning the prefix in reverse order fails completely (0% success) because tweaking earlier steps later on invalidates the states expected by subsequent steps.
  • Foreground masking is mandatory: Without restricting adversarial noise to the foreground object, optimization dumps perturbations into the background—which commercial preprocessors promptly slice away, dropping attack success to 0%.

Key Results

Tested on three state-of-the-art models (Hunyuan3D, CraftsMan3D, and Direct3D-S2) using human + VLM perceptual verification (ASR-v):

  • Live Commercial Services: Every PTA3D adversarial image bypassed online NSFW filters, achieving 88.5% ASR-v on Hunyuan3D, 43.8% on CraftsMan3D, and 41.5% on Direct3D-S2 (whereas full-trajectory backpropagation scored 0% across the board).
  • White-Box & Speed: Achieved 90.8%–94.6% ASR-v on P3DD while running 10.86$\times$ faster than full-trajectory backpropagation.
  • Black-Box Transfer: Across completely different model architectures, PAO boosted average cross-model transferability from 8.8% to 30.3%.
  • Defense (PSD): Standalone image inspectors caught 0% of PTA3D inputs. Adding PSD caught 62.3%–65.4% of adversarial attacks (boosting overall detection by 31.9% on average) while adding just 1.25–6.36 seconds of latency to a minute-scale generation pipeline.
Figure 4. Examples on Online services. Only PTA3D reconstructs the attacker-specified geometry from visually benign inputs.

Limitations and Future Work

  • Surrogate-to-service gaps: Attack success drops on commercial CraftsMan3D and Direct3D-S2 compared to Hunyuan3D, likely due to undocumented differences between open-source weights and proprietary production deployments.
  • Cross-architecture friction: Black-box transfer across distinct architectures (~30.3% ASR-v) remains imperfect because models vary in latent scaling, schedules, and learned trajectories; optimizing across an ensemble of surrogates could strengthen transferability.
  • Defense trade-offs: Integrating PSD increases false-positive rates on benign images (from ~2–4.5% up to 10.9%–13.5%). Future work aims to build lighter, sharper prefix-level inspectors that boost security with minimal false alarms and overhead.

Summary updated

Abstract

Online services that deploy Image-to-3D models enable users to generate high-quality 3D assets from a single image. However, the generated 3D geometry can violate content policies and cause broader security risks. To prevent such content, these services typically use policy-restricted inspectors to examine uploaded images before generation. Since the inspector examines only the visible content of the input, a visually benign image can still induce the generation of policy-restricted 3D geometry. However, turning this vulnerability into an effective attack is non-trivial in the black-box setting: global backpropagation through the long DiT generation trajectory is difficult to fit, while different image preprocessing pipelines across services can substantially reduce transferability. In this paper, we present PTA3D, a targeted adversarial attack against Image-to-3D models that addresses these challenges through Prefix Trajectory Alignment (PTA) and Preprocessing Aware Optimization (PAO). PTA progressively aligns the prefix DiT outputs of the adversarial trajectory with those of the target trajectory, where the core geometric structure is formed, allowing the final geometry to be controlled without optimizing through the complete generation trajectory. PAO exposes adversarial optimization to diverse image transformations rather than a single preprocessing pipeline, reducing sensitivity to the mismatch between surrogate and target services. We establish a prefix-to-output bound and a preprocessing-aware transfer bound to theoretically characterize the effectiveness of the two designs. Experiments on three open-source Image-to-3D models and three online services show that PTA3D achieves 41.5%-88.5% ASR on online services and 90.8%-94.6% ASR in white box settings, substantially outperforming existing attacks.
BibTeX
@misc{yang2026hijacking,
  author = {Yilong Yang and Jiale Teng and Yule Liu and Yang Liu and Xinlei He and Zhuo Ma},
  title = {{Hijacking 3D Generation: Targeted Adversarial Attacks against Image-to-3D Models via Prefix Trajectory Alignment}},
  year = {2026},
  eprint = {2611.34075},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34075},
}
Figure