Inclusive or Exploitable? Cultural Exclusion and ReDoS Vulnerabilities in LLM-Generated Input Validation Code

Large language models (LLMs) increasingly write the input validators that guard web registration forms, so the generated code decides both who can sign up and which untrusted input reaches the application. We evaluated 1920 JavaScript validators generated by four LLMs (GPT-5 mini, Gemini 3.8 Flash, DeepSeek-V3.2 and Llama 3.1 8B) for six personal-data fields, varying prompt language, usage context and an explicit inclusivity instruction. Each validator was executed against 229 valid inputs drawn from documented naming, telephony and addressing conventions and 43 invalid ones, and its regular expressions were tested for Regular Expression Denial of Service (ReDoS) with static analysis and a growth-based test of the whole function. Without the instruction, validators rejected 46.1% of valid non-Anglo-American inputs, mainly because of ASCII-only character classes. A one-sentence inclusivity instruction cut false rejection to 20.5% (odds ratio 0.19) but loosened structural checks on malformed input, and helped the locally served Llama 3.1 8B configuration far less. For GPT-5 mini, the same sentence raised confirmed ReDoS-vulnerable validators from 0/239 to 32/240, 10 of them exponential and exploitable with inputs under 70 characters; fewer than a third of statically flagged validators were confirmed as exploitable. Inclusive validation is cheap to request, but it should not be deployed without automated security checks.

Authors

Institutions

Publication Details

Journal
Future Internet
Published
2026-12-02
DOI
https://doi.org/10.3390/fi18120666
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Inclusive or Exploitable? Cultural Exclusion and ReDoS Vulnerabilities in LLM-Generated Input Validation Code

Jaime Govea, Rommel Gutierrez
Future Internet
Web Application Security Vulnerabilities
article

Inclusive or Exploitable? Cultural Exclusion and ReDoS Vulnerabilities in LLM-Generated Input Validation Code

Jaime Govea, Rommel Gutierrez
article en

Abstract

Large language models (LLMs) increasingly write the input validators that guard web registration forms, so the generated code decides both who can sign up and which untrusted input reaches the application. We evaluated 1920 JavaScript validators generated by four LLMs (GPT-5 mini, Gemini 3.8 Flash, DeepSeek-V3.2 and Llama 3.1 8B) for six personal-data fields, varying prompt language, usage context and an explicit inclusivity instruction. Each validator was executed against 229 valid inputs drawn from documented naming, telephony and addressing conventions and 43 invalid ones, and its regular expressions were tested for Regular Expression Denial of Service (ReDoS) with static analysis and a growth-based test of the whole function. Without the instruction, validators rejected 46.1% of valid non-Anglo-American inputs, mainly because of ASCII-only character classes. A one-sentence inclusivity instruction cut false rejection to 20.5% (odds ratio 0.19) but loosened structural checks on malformed input, and helped the locally served Llama 3.1 8B configuration far less. For GPT-5 mini, the same sentence raised confirmed ReDoS-vulnerable validators from 0/239 to 32/240, 10 of them exponential and exploitable with inputs under 70 characters; fewer than a third of statically flagged validators were confirmed as exploitable. Inclusive validation is cheap to request, but it should not be deployed without automated security checks.

Future InternetVol. 18(12)
Universidad de Las Américas (EC)
Web Application Security Vulnerabilities
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon