Multi-step Jailbreaking Privacy Attacks on ChatGPT

Haoran Li, Dadi Guo, Wei Fan, Mingshi Xu, Jie Huang, Fanpu Meng, Yangqiu Song

Introduction

Large Language Models (LLMs) like ChatGPT are trained on vast swaths of internet data, which often includes sensitive personally identifiable information (PII). While modern models employ Reinforcement Learning from Human Feedback (RLHF) to implement safety filters that refuse to disclose private data, this research demonstrates that such defenses are surprisingly fragile. By using a novel Multi-step Jailbreaking Prompt (MJP), attackers can bypass these ethical constraints to extract memorized PII with high accuracy.

Methodology: The Multi-step Jailbreaking Prompt

The core of the attack lies in undermining the model's safety alignment through a structured, multi-turn dialogue. Unlike a direct query, which triggers a standard refusal, the MJP uses a three-stage approach:

  1. Jailbreaking Template: The user provides a complex prompt (e.g., "Developer Mode") that instructs the model to ignore its standard safety protocols.
  2. Simulated Acknowledgment: The attacker provides a simulated response where the model appears to accept the jailbreak, lowering its internal threshold for refusal.
  3. Query with Guessing: The actual sensitive request is made, appended with a "Guess Template." This encourages the model to provide a "random guess" if it claims not to know the information, effectively bypassing the refusal mechanism by framing the leak as a hypothetical or probabilistic output.
The progression from direct prompts to the Multi-step Jailbreaking Prompt (MJP) with verification.

To further enhance the reliability of the extracted data, the researchers introduced Response Verification techniques. These include Multiple Choice (MC), where the model selects the most likely PII from a list of its own generated candidates, and Majority Voting (MV), which involves generating multiple responses and selecting the most frequent answer to mitigate hallucinations.

Experimental Results

The study evaluated the effectiveness of these attacks using the Enron Email Dataset and Institutional Pages (faculty contact info). The results highlight a significant gap between the model's intended behavior and its actual vulnerability.

As shown in the table below, direct prompts (DP) were almost entirely ineffective at extracting emails. However, the MJP, especially when combined with Majority Voting, achieved a success rate of nearly 60% for frequently occurring entities in the training set.

Email recovery performance across different prompting strategies on the Enron dataset.

Key findings from the experiments include:

  • Memorization Density: ChatGPT is significantly better at recovering email addresses than phone numbers. This suggests that the model memorizes structured text patterns more effectively than high-entropy numerical sequences.
  • Verbatim Leakage: In several instances, the model was able to recover long-form email content almost verbatim, confirming that training data is stored directly within the model's weights rather than just being generalized.

The Search Engine Risk

A critical finding of this research is the "Search Multiplier" effect observed in search-integrated LLMs like the New Bing. By allowing the model to browse the live web, the privacy risk is amplified. The New Bing was able to recover 94% of institutional emails and 48% of phone numbers using simple direct prompts. This integration allows the model to "ground" its internal knowledge in real-time search results, making it trivial to harvest PII that the standalone model might otherwise protect.

Discussion and Limitations

The research suggests that ChatGPT’s "morality" is essentially a thin veil—a safety layer that prevents the output of sensitive data rather than removing the data from the model's memory. By framing requests as "guesses" or role-playing scenarios, the MJP effectively circumvents these filters.

However, the attack has limitations. It is significantly less effective on "long-tail" or infrequent data that the model likely encountered only a few times during training. Furthermore, because ChatGPT is a closed-source "black box," it is difficult to distinguish between true memorization and highly accurate "hallucinations" based on common email formatting patterns (e.g., [email protected]).

Conclusion

This study underscores the persistent privacy risks inherent in large-scale LLMs. While RLHF provides a surface-level defense, the underlying memorization of training data remains accessible to sophisticated prompting techniques. As LLMs become increasingly integrated with external tools like search engines, the surface area for privacy attacks expands, necessitating more robust, fundamental approaches to data sanitization and model alignment.

Summary updated

BibTeX
@inproceedings{li2023multi,
  author = {Haoran Li and Dadi Guo and Wei Fan and Mingshi Xu and Jie Huang and Fanpu Meng and Yangqiu Song},
  title = {{Multi-step Jailbreaking Privacy Attacks on ChatGPT}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.272},
}
Figure