Injection & Code Vulnerabilities
Injection & Code Vulnerabilities
These are the textbook vulnerabilities, well understood and well mapped to CWE, where attacker-controlled input reaches a dangerous operation. They remain common because a single unescaped value in the wrong place is enough. Static analysis catches many of them, and the value is in confirming which are actually reachable from untrusted input.
Injection (SQL, NoSQL, Command, Template)
CWE-89CWE-78CWE-94OWASP A03:2021- What it is
- Untrusted input is concatenated into a query, shell command, or template instead of being safely parameterized.
- Why it matters
- Data theft, data destruction, or remote code execution depending on the sink.
- How to check
- Use parameterized queries and safe APIs; never build commands or queries by string concatenation.
Cross-Site Scripting (XSS)
CWE-79OWASP A03:2021- What it is
- Untrusted input is rendered into a page without proper encoding, in reflected, stored, or DOM form.
- Why it matters
- Session theft, account takeover, and actions performed as the victim.
- How to check
- Encode output by context and apply a strong Content-Security-Policy.
Server-Side Request Forgery (SSRF)
CWE-918OWASP A10:2021- What it is
- The server fetches a URL supplied by the user, allowing requests to internal services or cloud metadata endpoints.
- Why it matters
- Access to internal systems and cloud credentials, a frequent path to full compromise.
- How to check
- Allow-list outbound destinations and block internal and metadata addresses.
Path Traversal & File Inclusion
CWE-22- What it is
- User input is used in a file path without normalization, allowing access outside the intended directory.
- Why it matters
- Reading or writing arbitrary files on the server.
- How to check
- Resolve and validate paths against an allowed root; never pass user input directly to the filesystem.
Insecure Deserialization
CWE-502OWASP A08:2021- What it is
- Untrusted data is deserialized into objects, enabling tampering or code execution.
- Why it matters
- Remote code execution or object injection.
- How to check
- Avoid deserializing untrusted input; use safe formats and strict schemas.
Cryptographic Misuse
CWE-327CWE-330- What it is
- Weak algorithms, static IVs, ECB mode, or predictable randomness are used for security-sensitive operations.
- Why it matters
- Encrypted data or tokens can be forged or recovered.
- How to check
- Use vetted algorithms and libraries, strong random sources, and authenticated encryption.
In-depth guides
SQL Injection
Untrusted input is concatenated into a database query, letting an attacker change what the query does, read, modify, or destroy data they should never reach.
CWE-79Cross-Site Scripting (XSS)
Untrusted input is rendered into a page without being neutralized, so an attacker's script runs in another user's browser with that user's session.
CWE-918Server-Side Request Forgery (SSRF)
The server fetches a URL supplied by the user, letting an attacker aim the server's own privileged network access at internal systems or cloud metadata.
CWE-22Path Traversal
User-controlled input is used to build a file path, letting an attacker reach files outside the intended directory.
CWE-78OS Command Injection
Untrusted input is placed into a command run by a shell, letting an attacker execute their own commands.
CWE-94Code Injection
Untrusted input is evaluated as program code, letting an attacker run arbitrary logic in the application.
CWE-327Use of a Broken or Risky Cryptographic Algorithm
Data is protected with a cryptographic algorithm that is broken or outdated, so the protection can be defeated.
CWE-330Use of Insufficiently Random Values
A security-sensitive value is generated from a predictable source, so an attacker can guess or reproduce it.
CWE-502Insecure Deserialization
Untrusted data is deserialized into objects, letting an attacker trigger code execution or unexpected behavior.
Related coverage
Check your code for injection & code vulnerabilities
Tethlyn Audit checks your codebase for injection & code vulnerabilities and more, then ranks each finding by real exploitability and data sensitivity.