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

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.

See Tethlyn Audit