mlsanityData to 14 Oct 2026

Repairing Regex Vulnerabilities via Localization-Guided Instructions

arXiv 2510.09037 ↗First posted 10 Oct 2025cs.AI cs.PLcited by 0

Not on the map. Why?

Abstract (arXiv)

Regular expressions (regexes) are foundational to modern computing for critical tasks like input validation and data parsing, yet their ubiquity exposes systems to regular expression denial of service (ReDoS), a vulnerability requiring automated repair methods. Current approaches, however, are hampered by a trade-off. Symbolic, rule-based system are precise but fails to repair unseen or complex vulnerability patterns. Conversely, large language models (LLMs) possess the necessary generalizability but are unreliable for tasks demanding strict syntactic and semantic correctness. We resolve this impasse by introducing a hybrid framework, localized regex repair (LRR), designed to harness LLM generalization while enforcing reliability. Our core insight is to decouple problem identification from the repair process. First, a deterministic, symbolic module localizes the precise vulnerable subpattern, creating a constrained and tractable problem space. Then, the LLM invoked to generate a semantically equivalent fix for this isolated segment. This combined architecture successfully resolves complex repair cases intractable for rule-based repair while avoiding the semantic errors of LLM-only approaches. Our work provides a validated methodology for solving such problems in automated repair, improving the repair rate by 15.4%p over the state-of-the-art. Our code is available at https://github.com/cdltlehf/LRR.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 41 references that are in the map. First posted on arXiv 10 Oct 2025.

Builds on

18 of 41 references.

References · 18

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  3. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  4. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  5. 2021MetaICL: Learning to Learn In Contextcited by 454
  6. 2022Large Language Models Meet NL2Code: A Surveycited by 138
  7. 2022Diet Code Is Healthy: Simplifying Programs for Pre-trained Models of Codecited by 24
  8. 2025Llama-3.1-FoundationAI-SecurityLLM-8B-Instruct Technical Reportcited by 23
  9. 2025LAQuer: Localized Attribution Queries in Content-grounded Generationcited by 13
  10. 2024Sketch-Guided Constrained Decoding for Boosting Blackbox Large Language Models without Logit Accesscited by 9
  11. 2023Out of Context: How important is Local Context in Neural Program Repair?cited by 5
  12. 2021Why Aren't Regular Expressions a Lingua Franca? An Empirical Study on the Re-use and Portability of Regular Expressionscited by 4
6 more
  1. 2024Deconstructing In-Context Learning: Understanding Prompts via Corruptioncited by 4
  2. 2020Repairing DoS Vulnerability of Real-World Regexescited by 2
  3. 2013Locally Repairable Codes with Multiple Repair Alternativescited by 1
  4. 2014Static Analysis for Regular Expression Exponential Runtime via Substructural Logics (Extended)cited by 1
  5. 2022Improving Developers' Understanding of Regex Denial of Service Tools through Anti-Patterns and Fix Strategiescited by 1
  6. 2024SoK: A Literature and Engineering Review of Regular Expression Denial of Service (ReDoS)cited by 1

Built on by

Not cited yet.