Skip to main content

Chapter 7: References & Standards

Real-World CVE Breakdown

Examining historical security advisories provides crucial context on how secure coding failures impact enterprise production environments.

CVE IDVulnerability ClassAffected ComponentRoot CauseSecure Coding Mitigation
CVE-2021-44228JNDI Remote Code ExecutionApache Log4j2Untrusted input logged in string format was evaluated as executable lookup expressions.Treat log strings strictly as static data; disable remote lookup parsers.
CVE-2021-41773Path Traversal & RCEApache HTTP Server 2.4.49Alias mapping failed to normalize path segment double dots (.%2e/).Perform canonical path resolution (abspath) before boundary validation.
CVE-2018-1271Directory TraversalSpring FrameworkResource handler parsed un-normalized Windows/POSIX path separators (..\).Validate absolute canonical containment (Path.normalize().startsWith).
CVE-2022-22965ClassLoader Data BindingSpring FrameworkUnbounded HTTP request payload property binding enabled ClassLoader manipulation.Enforce strict schema allowlists for HTTP request body properties.
CVE-2020-11022Cross-Site Scripting (XSS)jQuery (< 3.5.0)Passing HTML strings containing <option> elements to .html() caused mXSS mutation.Use safe context-aware DOM sanitizers (DOMPurify) instead of regex parsing.

CWE Top 25 & OWASP ASVS Mapping

CWE IDVulnerability NameOWASP 2021 CategoryASVS v4.0 Requirement
CWE-20Improper Input ValidationA03:2021 - InjectionV5.1.1 - Verify that input data is validated using allowlists.
CWE-22Path Traversal (Improper Limitation of a Pathname)A01:2021 - Broken Access ControlV12.3.1 - Verify that path traversal controls block unauthorized file access.
CWE-79Cross-Site Scripting (Improper Output Neutralization)A03:2021 - InjectionV5.3.1 - Verify that context-aware output encoding is applied to user data.
CWE-89SQL InjectionA03:2021 - InjectionV5.3.4 - Verify that database access uses parameterized interfaces.
CWE-116Improper Encoding or Escaping of OutputA03:2021 - InjectionV5.3.2 - Verify that encoding libraries handle all special characters.
CWE-434Unrestricted File Upload of Dangerous TypeA08:2021 - Software & Data IntegrityV12.1.1 - Verify that file uploads are validated via binary signature (magic bytes).

Industry Standards & Frameworks

1. OWASP Standards

2. NIST & Enterprise Benchmarks


Tooling, Libraries & Documentation

Security Testing & Analysis

  • Semgrep Rule Registry: Explore production static analysis rules for Python, JS/TS, Go, Java, and Docker.
  • Helmet JS: Express middleware for hardening HTTP security headers.
  • DOMPurify GitHub: Ultra-fast HTML/SVG XSS sanitizer for Node.js and browser environments.

Schema Validation & Encoding Libraries


[!NOTE] Keep your security baseline aligned with OWASP ASVS Level 2 for enterprise web applications, and mandate automated SAST scanning in all CI/CD deployment pipelines.

Share this guide