Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: 367a8155
Paper published September 1, 2024
Entry analyzed December 29, 2024
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

Symbolic Math Jailbreak

Large Language Models (LLMs) are vulnerable to a jailbreaking attack, termed "MathPrompt," which leverages the models' ability to process symbolic mathematics to bypass built-in safety mechanisms. The attack encodes…

BibTeX citation

Paper-evaluated models(13)

Claude 3 Haiku, Claude 3 Opus, Claude 3 Sonnet +10 more
  • Claude 3 Haiku
  • Claude 3 Opus
  • Claude 3 Sonnet
  • Claude 3.5 Sonnet
  • Gemini 1.5 Flash
  • Gemini 1.5 Flash (block None)
  • Gemini 1.5 Pro
  • Gemini 1.5 Pro (block None)
  • GPT-4
  • GPT-4 Turbo
  • GPT-4o
  • GPT-4o Mini
  • Llama 3.1 70B

Description

Large Language Models (LLMs) are vulnerable to a jailbreaking attack, termed "MathPrompt," which leverages the models' ability to process symbolic mathematics to bypass built-in safety mechanisms. The attack encodes harmful natural language prompts into mathematically formulated problems, causing the LLM to generate unsafe outputs while ostensibly solving a mathematical problem.

Examples

See the paper "Jailbreaking Large Language Models with Symbolic Mathematics" for detailed examples of MathPrompt attacks and their corresponding unsafe outputs. Examples are included in Appendix B and Appendix C of the submitted paper.

Impact

Successful exploitation of this vulnerability allows attackers to circumvent LLMs' safety features, leading to the generation of unsafe content such as instructions for illegal activities, hate speech, or the creation of fraudulent documents. The average attack success rate across 13 state-of-the-art LLMs was 73.6%.

Affected Systems

The vulnerability affects a wide range of LLMs, including but not limited to those from OpenAI (GPT-4o, GPT-4o mini, GPT-4 Turbo, GPT-4-0613), Anthropic (Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Sonnet, Claude 3 Haiku), Google (Gemini 1.5 Pro, Gemini 1.5 Flash), and Meta AI (Llama 3.1 70B). The vulnerability's impact may vary depending on the specific LLM and its safety mechanisms.

Mitigation Steps

  • Implement input sanitization and validation that goes beyond basic natural language processing to account for mathematically encoded prompts. This may involve identifying and analyzing mathematical expressions within input to detect malicious intent.
  • Develop and deploy robust detection mechanisms specifically designed to identify and flag mathematically encoded prompts that exhibit characteristics consistent with harmful intent. This could involve specialized machine learning models trained to identify semantically shifted embeddings resulting from encoding, as observed in this research.
  • Enhance LLM safety training to better account for and generalize to inputs that are encoded in mathematical representations. This requires developing new training methodologies and datasets focused on such adversarial inputs.
  • Regularly red-team LLMs using diverse and sophisticated jailbreaking techniques, including mathematical encoding, to identify and address vulnerabilities proactively. This process should involve both automated and human-in-the-loop verification methods.

Research context and confidence

Evidence and verification
Paper-reported; independent reproduction is not documented.
Primary research source linked.
Severity
Not rated by this catalog.
Source and publication type
arXiv · Research preprint.
Peer-review status is not provided by this source.
Author and publication status
Author metadata is not stored; see the primary paper.
Threat model and attacker access
Black-box model, service, or application access.
Related deployment categories
No related deployment category is classified.
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
The vulnerability affects a wide range of LLMs, including but not limited to those from OpenAI (GPT-4o, GPT-4o mini, GPT-4 Turbo, GPT-4-0613), Anthropic (Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Sonnet, Claude 3…

Research Paper

Jailbreaking Large Language Models with Symbolic Mathematics

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.

https://arxiv.org/abs/2409.11445