Look up the ID your scanner or report gives, or find the weakness below: each links the guides that explain the fix and the labs and projects to practise it.
Injection and unsafe parsing
Cross-site scripting (XSS)
CWE-79CWE-116A05:2025 InjectionCWE Top 25 #1
Also called Reflected XSS, Stored XSS, DOM-based XSS, Unescaped output.
Fix cards: Cross-site scripting (XSS) (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
- Prevent XSS at the output boundary
- Prevent DOM XSS, postMessage abuse and client-side injection
- Render rich text without granting it application privileges
- Keep generated output out of executable contexts
Practice: XSS lab
SQL injection
CWE-89A05:2025 InjectionCWE Top 25 #2
Also called SQLi, Query built from strings, Unparameterized query.
Fix cards: SQL injection (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
Command, code and template injection
CWE-78CWE-77CWE-88CWE-94CWE-95CWE-1336CWE-917CWE-943CWE-90CWE-643A05:2025 InjectionCWE Top 25 #9
Also called OS command injection, eval of input, Server-side template injection, NoSQL and LDAP injection, XPath injection.
Fix cards: OS command and argument injection (JavaScript, Python, Java, C#, TypeScript, Go) · Code injection (JavaScript, Python, Java, C#) · Server-side template injection (JavaScript, Python, Java, C#) · LDAP filter injection (Python, Java) · NoSQL operator injection (JavaScript, Python) · XPath injection (Python, Java, C#)
- Keep untrusted values out of executable syntax
- Prevent NoSQL, LDAP, XPath and expression-language injection
- Keep untrusted CI work outside the release boundary
- Keep generated output out of executable contexts
- Run external programs without command or argument injection
- Keep untrusted input out of eval, expression languages and templates
CSV and spreadsheet formula injection
Also called CSV injection, Formula injection, DDE injection.
Fix cards: CSV formula injection (JavaScript, Python, Java, C#, Ruby)
Deserialization and XML parsing (XXE)
CWE-502CWE-611CWE-776CWE-20A08:2025 Software or Data Integrity FailuresA02:2025 Security MisconfigurationA05:2025 InjectionCWE Top 25 #15
Also called Insecure deserialization, XXE, Entity expansion, Unbounded parsing.
Fix cards: Insecure deserialization (JavaScript, Python, Java, C#, Ruby, PHP) · XML external entity (XXE) processing (Python, Java, C#)
- Parse bounded JSON and XML into an explicit application schema
- Keep untrusted values out of executable syntax
- Treat model releases as executable supply-chain inputs
Practice: Project: Parse bounded JSON and XML invoices safely
Prototype pollution
Also called __proto__ in a merge, Unsafe deep merge.
Practice: Project: Stop prototype pollution at merge and authorization boundaries
Memory-safety bugs
CWE-787CWE-125CWE-416CWE-120CWE-121CWE-122CWE-476A10:2025 Mishandling of Exceptional ConditionsCWE Top 25 #5
Also called Buffer overflow, Out-of-bounds read or write, Use after free, NULL dereference.
- Find, fix and contain memory-safety bugs in C and C++
- Audit unsafe Rust, FFI boundaries and crate dependencies
- Fuzz a parser and turn crashes into lasting regressions
Practice: Project: Repair a native parser using sanitizer evidence
Access control and request forgery
Missing or broken authorization
CWE-862CWE-863CWE-639CWE-284CWE-285A01:2025 Broken Access ControlCWE Top 25 #4
Also called IDOR, BOLA, BFLA, Privilege escalation, Broken access control.
Fix cards: Missing object-level authorization (IDOR and BOLA) (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
- Enforce authorization for every object action
- Authorize functions and fields as well as objects
- Authorization models: RBAC, ABAC, ReBAC and policy as code you can test
Practice: IDOR lab · RAG access control lab · Excessive agency lab · Project: Secure a real HTTP API
Mass assignment and excessive data exposure
CWE-915CWE-213A08:2025 Software or Data Integrity Failures
Also called BOPLA, Overposting, Excessive data exposure.
Fix cards: Mass assignment (over-posting) (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
- Authorize functions and fields as well as objects
- Keep untrusted object keys out of prototype and authority paths
Practice: Project: Secure a real HTTP API
Path traversal and file inclusion
CWE-22CWE-23CWE-59CWE-98A01:2025 Broken Access ControlA05:2025 InjectionCWE Top 25 #6
Also called Directory traversal, Zip Slip, Symlink following, LFI, RFI, Path injection.
Fix cards: Path traversal (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
- Extract archives without escaping the destination
- Prevent file inclusion: LFI, RFI, dynamic imports and template names
- Design a safer file-upload pipeline
Practice: Path traversal lab · Project: Keep extracted files inside their boundary
Unrestricted file upload
CWE-434A06:2025 Insecure DesignCWE Top 25 #12
Also called Dangerous file type, Upload served as active content.
Fix cards: Unrestricted file upload (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
- Design a safer file-upload pipeline
- Extract archives without escaping the destination
- Convert untrusted office documents and PDFs in an isolated parser
Practice: Project: Keep extracted files inside their boundary · Project: Convert untrusted documents in a locked-down container
Cross-site request forgery (CSRF)
CWE-352CWE-1275A01:2025 Broken Access ControlCWE Top 25 #3
Also called XSRF, Missing CSRF token, SameSite cookie.
Fix cards: Cross-site request forgery (CSRF) (JavaScript, Python, Java, C#, Ruby, PHP) · Session fixation and session cookies (JavaScript, Python, Java, C#, Ruby, PHP)
- Protect cookie-authenticated actions against CSRF
- Session management: cookies, timeouts, rotation and revocation
Practice: CSRF lab
Server-side request forgery (SSRF)
CWE-918A01:2025 Broken Access ControlCWE Top 25 #22
Also called Unvalidated URL fetch, Cloud metadata access.
Fix cards: Server-side request forgery (SSRF) (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
Open redirect
CWE-601A01:2025 Broken Access Control
Also called Unvalidated redirect, redirect_uri manipulation.
Fix cards: Open redirect (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP)
Authentication, sessions and tokens
Missing or weak authentication
CWE-306CWE-287CWE-307CWE-640CWE-308A07:2025 Authentication FailuresCWE Top 25 #21
Also called Missing authentication, No brute-force limit, Weak password reset, Single factor.
Fix cards: Missing authentication for a critical function (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP) · JWT validation in APIs (bearer tokens) (JavaScript, Python, Java, C#, TypeScript, Go)
- Stop account takeover with the right MFA and login defenses
- Passkeys and MFA: WebAuthn enrollment, sign-in and replacement
- Account recovery: password resets, help-desk resets and account linking
- Maintain an API inventory and prevent gateway bypass
- Verify webhook deliveries before acting
Practice: Password reset token lab
Session management flaws
CWE-384CWE-613CWE-614CWE-1004A07:2025 Authentication FailuresA02:2025 Security Misconfiguration
Also called Session fixation, No session expiry, Cookie without Secure or HttpOnly.
Fix cards: Session fixation and session cookies (JavaScript, Python, Java, C#, Ruby, PHP)
- Session management: cookies, timeouts, rotation and revocation
- SCIM deprovisioning: make account disablement remove every usable authority
- Case study: the Okta support-system breach and session tokens in HAR files (2023)
Practice: Project: Prove deprovisioning reaches sessions and queued work
Weak password storage
CWE-916CWE-759CWE-760CWE-257CWE-521A04:2025 Cryptographic FailuresA07:2025 Authentication Failures
Also called Fast or unsalted hash, MD5 or SHA-1 passwords, Recoverable passwords.
Fix cards: Weak password hashing (JavaScript, Python, Java, C#, Go, PHP)
Token and signature verification
CWE-347CWE-345CWE-290CWE-294A04:2025 Cryptographic FailuresA08:2025 Software or Data Integrity FailuresA07:2025 Authentication Failures
Also called Unverified JWT, JWT alg none, SAML signature wrapping, Webhook replay.
Fix cards: JWT validation in APIs (bearer tokens) (JavaScript, Python, Java, C#, TypeScript, Go)
- JWT validation: algorithms, keys, claims and key rollover
- Defend JWTs against forgery, confusion and replay
- SAML single sign-on: verify signed assertions without losing the identity boundary
- Verify webhook deliveries before acting
- OAuth 2.0 and OpenID Connect login: authorization code with PKCE
Practice: JWT validation lab · Webhook signature and replay lab · Project: Verify tokens through rotation and revocation · Project: Prove deprovisioning reaches sessions and queued work
Cryptography and secrets
Hard-coded or leaked secrets
CWE-798CWE-522CWE-312CWE-532A07:2025 Authentication FailuresA06:2025 Insecure DesignA09:2025 Security Logging and Alerting Failures
Also called Hard-coded credentials, Leaked API key, Secrets in logs.
Fix cards: Hard-coded secrets (JavaScript, Python, Java, C#)
- Contain a leaked secret, then investigate and clean up
- Secrets management: storage, rotation and leaked-secret response
- Workload identity federation: short-lived, scoped identities for services and CI
- Create security logs someone can investigate
- Secrets at runtime: Vault, Kubernetes Secrets, CSI driver, External Secrets and SOPS
Weak or misused cryptography
CWE-327CWE-326CWE-323CWE-328CWE-330CWE-331A04:2025 Cryptographic Failures
Also called Weak algorithm, ECB mode, Nonce reuse, Short keys, Insecure randomness.
Fix cards: Insecure randomness for security tokens (JavaScript, Python, Java, C#, Go) · Weak password hashing (JavaScript, Python, Java, C#, Go, PHP)
- Choose cryptographic algorithms and parameters by job
- AEAD records: AES-GCM nonces, associated data and key limits
- Envelope encryption and key rotation: data keys, KMS keys and backups
- Post-quantum migration: cryptographic inventory, hybrid TLS and deadlines
- ECB mode: why it leaks patterns and what to use instead
Practice: AES-GCM nonce reuse lab · Project: Bind ciphertext to the correct record
Certificate validation and TLS
CWE-295CWE-297CWE-319A07:2025 Authentication FailuresA04:2025 Cryptographic Failures
Also called Certificate verification disabled, Hostname mismatch, Cleartext transmission.
Fix cards: Improper TLS certificate validation (JavaScript, Python, Java, C#, Go)
Configuration, design and operations
CORS, CSP and framing
CWE-942CWE-346CWE-1021A02:2025 Security MisconfigurationA07:2025 Authentication FailuresA06:2025 Insecure Design
Also called Permissive CORS, Missing Content Security Policy, Clickjacking.
Fix cards: Clickjacking (JavaScript, Python, TypeScript) · CORS misconfiguration on credentialed APIs (JavaScript, Python, Java, C#)
Race conditions and insecure temporary files
CWE-362CWE-367CWE-377CWE-379A06:2025 Insecure DesignA01:2025 Broken Access Control
Also called TOCTOU, Double spending, Concurrent request abuse, Temp file race, Symlink attack.
- Preserve business invariants under concurrent requests
- Create temporary files safely: mkstemp, O_EXCL and private directories
- Bound background jobs and make retries safe
Practice: Race condition lab · Project: Make a checkout transaction atomic
Missing limits and resource exhaustion
CWE-770CWE-400CWE-1333CWE Top 25 #25
Also called No rate limit, Unbounded query or upload, ReDoS, Denial of service.
Fix cards: Unrestricted file upload (JavaScript, Python, Java, C#, TypeScript, Go, Ruby, PHP) · Unbounded resource consumption (JavaScript, C#, Python, Go) · Regular-expression denial of service (ReDoS) (JavaScript, Python, Java, C#)
Error handling and information exposure
CWE-209CWE-200CWE-636A10:2025 Mishandling of Exceptional ConditionsA01:2025 Broken Access ControlCWE Top 25 #20
Also called Stack trace in a response, Verbose errors, Failing open.
Logging failures and log injection
CWE-117CWE-778CWE-532A09:2025 Security Logging and Alerting Failures
Also called Log injection, Missing audit log, Sensitive data in logs.
Fix cards: CRLF injection in logs and response headers (JavaScript, Python, Java)
Excessive privileges in cloud and containers
CWE-250CWE-732CWE-269A01:2025 Broken Access ControlA06:2025 Insecure Design
Also called Privileged container, Overly broad IAM role, World-writable resource.
- Run Kubernetes workloads with only the privileges they need
- Harden container images from Dockerfile to admission
- Review cloud permissions and role trust together
- Apply a security baseline across AWS, Azure and Google Cloud
- Review infrastructure changes as access changes
- Test infrastructure policy and detect security-relevant drift
- Prove network and admission policies enforce the intended boundary
Practice: Privileged container lab · Project: Verify Kubernetes admission and network boundaries
Request smuggling and cache poisoning
CWE-444CWE-524A06:2025 Insecure Design
Also called HTTP desync, Web cache deception, Cache poisoning.
Dependencies and the build
Vulnerable or malicious dependencies
CWE-1395CWE-1104CWE-1357CWE-506A03:2025 Software Supply Chain FailuresA08:2025 Software or Data Integrity Failures
Also called Known-vulnerable package (SCA), Unmaintained component, Malicious package.
- Respond to an exploited or malicious dependency
- Triage new dependency vulnerability findings
- Prioritize vulnerabilities by exploitation, exposure and impact
- Stop dependency confusion and typosquatting at install time
- Investigate a suspected malicious package safely
- Use VEX without losing vulnerability evidence
Practice: SBOM completeness lab
CI/CD and artifact integrity
CWE-829CWE-494CWE-345A08:2025 Software or Data Integrity Failures
Also called Untrusted pull request workflow, Unpinned action, Unsigned artifact.
- Keep untrusted CI work outside the release boundary
- Harden GitHub Actions against workflow and supply-chain attacks
- Protect the path from pull request to release
- Verify artifact signatures against an explicit trust policy
- Protect package publication and the update channel
Practice: Signed artifact provenance lab · Project: Build and verify a signed software release
AI features
Prompt injection and unsafe model output
CWE-1427LLM01:2026 Prompt InjectionLLM10:2026 Improper Output HandlingASI01:2026 Agent Goal Hijack
Also called Indirect prompt injection, Excessive agency, Model output rendered as HTML.
- Contain prompt injection at the application boundary
- Keep generated output out of executable contexts
- Authorize agent tools outside the model
- Keep retrieval inside the user’s data boundary
Practice: XSS lab · RAG access control lab · Excessive agency lab · Project: Enforce retrieval and tool boundaries across crashes
Not listed? Browse every CWE with a page here, check the OWASP Top 10:2025, or search for the finding’s name.
- Separate a reported symptom from the unsafe decision that causes it.
- Repair the boundary and its variants while preserving legitimate behavior.
- Join regression evidence to the actual deployed revision before closing.
A finding record linking cause, variants found, code change, positive and negative regression evidence and deployment status.
- Read a short request handler and its test output.
- Use the supplied SQL or authorization fixture; real targets require an authorized test scope.
Create finding F1 with the affected revision, entry point, attacker-controlled value, protected asset and observed result. Reproduce the scanner or report result first: one you cannot reproduce becomes a documented false positive with its reason, not a silent deletion. Set the due date from your remediation policy, using exposure and exploitation evidence such as a KEV listing rather than the scanner’s severity label alone. Use the connected SQL example or invoice fixture with synthetic records. Finish when another reviewer can replay the case and name the boundary that failed.
Write a short before-and-after explanation beside the change. For SQL, bind data values through the driver and constrain any dynamic identifier separately; for invoices, compare the authenticated tenant and ownership at the data-access boundary. Then look for variants: search the codebase for the same unsafe call or helper, or write a static-analysis rule for it, and fix or ticket every hit. Finish when each relevant path uses the corrected decision, rather than hiding the symptom in the interface or rejecting every request.
Retain a compact case table with input, expected result, observed result and candidate revision. Pair the original unsafe input with an ordinary successful request and a neighboring forbidden case, and keep the cases as regression tests that run on every build. Explain why each result distinguishes the repair from a blanket denial. Use the connected exercise to obtain observations; mark any unexecuted checks pending. Finish when the evidence covers the affected paths and still permits the intended action.
Join F1 to the patch, regression record and deployed artifact identity. If only the candidate is tested, record fix ready and rollout pending; if the fix cannot ship by the due date, ask the risk owner for a time-limited exception instead of letting the finding age. Close the finding only when the running version and its behavior match the verified change. Keep an owner, residual limitations and a reopening trigger such as another entry point using the old helper. A merged pull request alone is not completion.
The steps use a connected exercise: Fix SQL injection in Python sqlite3. To build the skills behind this job step by step, follow the learning path Developer foundations.
Use the blank work product for your system. Compare its required evidence with a completed synthetic example.
Download blank work product Download completed example