{"record_type":"pith_number_record","schema_url":"https://pith.science/schemas/pith-number/v1.json","pith_number":"pith:2026:6YPOKSKGKJDYAKR575HD2BSH2Z","short_pith_number":"pith:6YPOKSKG","schema_version":"1.0","canonical_sha256":"f61ee549465247802a3dff4e3d0647d6653b75a7db8e0a0817753093b52505a7","source":{"kind":"arxiv","id":"2606.11817","version":1},"attestation_state":"computed","paper":{"title":"Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code","license":"http://arxiv.org/licenses/nonexclusive-distrib/1.0/","headline":"","cross_cats":["cs.AI","cs.CL","cs.SE"],"primary_cat":"cs.CR","authors_text":"Jia Li, Shiteng Lu, Yitong Zhang","submitted_at":"2026-06-10T08:50:59Z","abstract_excerpt":"Large Language Models (LLMs) are increasingly used for code generation, raising concerns that they may be misused to produce malicious code. Meanwhile, Grammar-Constrained Decoding (GCD) has been widely adopted to improve the reliability of LLM-generated code by enforcing syntactic validity. In this paper, we reveal a counterintuitive risk: this reliability-oriented technique can itself become an attack surface. We uncover a new jailbreak attack, termed CodeSpear, that exploits GCD to induce LLMs into generating malicious code. Our experiments show that simply applying a benign code grammar co"},"verification_status":{"content_addressed":true,"pith_receipt":true,"author_attested":false,"weak_author_claims":0,"strong_author_claims":0,"externally_anchored":false,"storage_verified":false,"citation_signatures":0,"replication_records":0,"graph_snapshot":true,"references_resolved":false,"formal_links_present":false},"canonical_record":{"source":{"id":"2606.11817","kind":"arxiv","version":1},"metadata":{"license":"http://arxiv.org/licenses/nonexclusive-distrib/1.0/","primary_cat":"cs.CR","submitted_at":"2026-06-10T08:50:59Z","cross_cats_sorted":["cs.AI","cs.CL","cs.SE"],"title_canon_sha256":"d4375a3c6354c6a60043168089fbff69bd934a5ecaf8bf4c74529f0e1785cf55","abstract_canon_sha256":"8cdfb42788d7d383808284ecdeff78377608b8ba992e035ce537b5e370417f22"},"schema_version":"1.0"},"receipt":{"kind":"pith_receipt","key_id":"pith-v1-2026-05","algorithm":"ed25519","signed_at":"2026-06-11T01:10:09.665684Z","signature_b64":"L36nBBrBFoFzf3nwbu4KPmhXBEcqVK2gH6d3VOc77aK084c76QFN0rIQ7nr3EzNKGCj5CS+pyPYandHi6FZBBg==","signed_message":"canonical_sha256_bytes","builder_version":"pith-number-builder-2026-05-17-v1","receipt_version":"0.3","canonical_sha256":"f61ee549465247802a3dff4e3d0647d6653b75a7db8e0a0817753093b52505a7","last_reissued_at":"2026-06-11T01:10:09.664823Z","signature_status":"signed_v1","first_computed_at":"2026-06-11T01:10:09.664823Z","public_key_fingerprint":"8d4b5ee74e4693bcd1df2446408b0d54"},"graph_snapshot":{"paper":{"title":"Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code","license":"http://arxiv.org/licenses/nonexclusive-distrib/1.0/","headline":"","cross_cats":["cs.AI","cs.CL","cs.SE"],"primary_cat":"cs.CR","authors_text":"Jia Li, Shiteng Lu, Yitong Zhang","submitted_at":"2026-06-10T08:50:59Z","abstract_excerpt":"Large Language Models (LLMs) are increasingly used for code generation, raising concerns that they may be misused to produce malicious code. Meanwhile, Grammar-Constrained Decoding (GCD) has been widely adopted to improve the reliability of LLM-generated code by enforcing syntactic validity. In this paper, we reveal a counterintuitive risk: this reliability-oriented technique can itself become an attack surface. We uncover a new jailbreak attack, termed CodeSpear, that exploits GCD to induce LLMs into generating malicious code. Our experiments show that simply applying a benign code grammar co"},"claims":{"count":0,"items":[],"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"source":{"id":"2606.11817","kind":"arxiv","version":1},"verdict":{"id":null,"model_set":{},"created_at":null,"strongest_claim":"","one_line_summary":"","pipeline_version":null,"weakest_assumption":"","pith_extraction_headline":""},"integrity":{"clean":true,"summary":{"advisory":0,"critical":0,"by_detector":{},"informational":0},"endpoint":"/pith/2606.11817/integrity.json","findings":[],"available":true,"detectors_run":[],"snapshot_sha256":"c28c3603d3b5d939e8dc4c7e95fa8dfce3d595e45f758748cecf8e644a296938"},"references":{"count":0,"sample":[],"resolved_work":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57","internal_anchors":0},"formal_canon":{"evidence_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"author_claims":{"count":0,"strong_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"builder_version":"pith-number-builder-2026-05-17-v1"},"aliases":[{"alias_kind":"arxiv","alias_value":"2606.11817","created_at":"2026-06-11T01:10:09.664965+00:00"},{"alias_kind":"arxiv_version","alias_value":"2606.11817v1","created_at":"2026-06-11T01:10:09.664965+00:00"},{"alias_kind":"doi","alias_value":"10.48550/arxiv.2606.11817","created_at":"2026-06-11T01:10:09.664965+00:00"},{"alias_kind":"pith_short_12","alias_value":"6YPOKSKGKJDY","created_at":"2026-06-11T01:10:09.664965+00:00"},{"alias_kind":"pith_short_16","alias_value":"6YPOKSKGKJDYAKR5","created_at":"2026-06-11T01:10:09.664965+00:00"},{"alias_kind":"pith_short_8","alias_value":"6YPOKSKG","created_at":"2026-06-11T01:10:09.664965+00:00"}],"events":[],"event_summary":{},"paper_claims":[],"inbound_citations":{"count":0,"internal_anchor_count":0,"sample":[]},"formal_canon":{"evidence_count":0,"sample":[],"anchors":[]},"links":{"html":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z","json":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z.json","graph_json":"https://pith.science/api/pith-number/6YPOKSKGKJDYAKR575HD2BSH2Z/graph.json","events_json":"https://pith.science/api/pith-number/6YPOKSKGKJDYAKR575HD2BSH2Z/events.json","paper":"https://pith.science/paper/6YPOKSKG"},"agent_actions":{"view_html":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z","download_json":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z.json","view_paper":"https://pith.science/paper/6YPOKSKG","resolve_alias":"https://pith.science/api/pith-number/resolve?arxiv=2606.11817&json=true","fetch_graph":"https://pith.science/api/pith-number/6YPOKSKGKJDYAKR575HD2BSH2Z/graph.json","fetch_events":"https://pith.science/api/pith-number/6YPOKSKGKJDYAKR575HD2BSH2Z/events.json","actions":{"anchor_timestamp":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z/action/timestamp_anchor","attest_storage":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z/action/storage_attestation","attest_author":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z/action/author_attestation","sign_citation":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z/action/citation_signature","submit_replication":"https://pith.science/pith/6YPOKSKGKJDYAKR575HD2BSH2Z/action/replication_record"}},"created_at":"2026-06-11T01:10:09.664965+00:00","updated_at":"2026-06-11T01:10:09.664965+00:00"}