#4747th of 58 in Security
textattack
Python framework for adversarial attacks, augmentation and training of NLP models
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
- Stars
- 3.5k
- License
- MIT
- Last commit
- Aug 2026
- Last release
- Aug 2026
- Language
- Python
3,397 on 2 May 20263,483 on 21 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
TextAttack is a Python library and `textattack` CLI that runs published adversarial attack recipes (TextFooler, BAE, DeepWordBug, HotFlip, PWWS and others) against NLP classification and sequence-to-sequence models. Attacks are built from goal functions, constraints, transformations and search methods. It also provides text augmentation recipes and single-command model training.
Who it is for: NLP researchers testing model robustness and building adversarial attacks
Strengths
- About 20 attack recipes from papers, runnable with one `textattack attack` command
- Attacks are composable: swap transformation, constraints, goal function and search method
- Augmentation recipes (wordnet, embedding, charswap, eda, back_trans) with a CSV CLI
- Multi-GPU attacks via --parallel; GPU is optional
Weaknesses
- Targets classification and seq2seq models; no LLM jailbreak or prompt-injection tooling listed
- Many recipes need downloaded embeddings, sentence encoders and masked language models
- seq2sick is implemented black-box, unlike the white-box attack in its paper
- README gives Python 3.6+ as the baseline, which is dated
What it needs
- GPU optional
- Needs Python 3.6+, pip
- Models: BERT, DistilBERT, LSTM, T5, Keras models
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Known problems
Reported, then fixed by a linked change
- Compatibility issue w/ Transformers model ↗ (opens in a new tab)1 reactions · closed 14 Aug 2026Fixed by Fix six more issues from the unresolved-bugs backlog ↗ (opens in a new tab)
- Train model on custom dataset from file does not work ↗ (opens in a new tab)0 reactions · closed 14 Aug 2026Fixed by Fix training padding, add train --dataset-from-file, close doc gaps ↗ (opens in a new tab)
- `flair`-related issues with Word Swap by Inflections ↗ (opens in a new tab)0 reactions · closed 14 Aug 2026Fixed by Fix bert-attack slowness, CLARE <SPLIT>-token corruption, and WordSwapInflections POS mismatch ↗ (opens in a new tab)
- bert-attack doesn't work very well ↗ (opens in a new tab)0 reactions · closed 14 Aug 2026Fixed by Fix bert-attack slowness, CLARE <SPLIT>-token corruption, and WordSwapInflections POS mismatch ↗ (opens in a new tab)
- Bug when attacking <SPLIT> in MNLI using CLARE ↗ (opens in a new tab)0 reactions · closed 14 Aug 2026Fixed by Fix bert-attack slowness, CLARE <SPLIT>-token corruption, and WordSwapInflections POS mismatch ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Security
See all 58| Rank | Project | Score |
|---|---|---|
| #45 | pwnagotchiWiFi handshake-capturing agent that tunes its attacks with reinforcement learning | 49 out of 100 |
| #46 | deepteamRed teaming framework that attacks LLM apps and scores vulnerabilities | 49 out of 100 |
| #48 | aibeatSecurity evaluation of LLMs, RAG apps and agents, with trace evidence | 47 out of 100 |
| #49 | pentest-ai-agentsClaude Code subagents for pentesting, from recon to reporting | 46 out of 100 |
| #50 | superagentSDK that blocks prompt injections and redacts PII in AI agent apps | 44 out of 100 |