▸ CODESCAN
DocsSupportScanner
CWE REFERENCE

Common Weakness Enumeration (CWE)

The Common Weakness Enumeration (CWE) is a community-developed list of software and hardware weakness types maintained by MITRE Corporation and sponsored by the US Department of Homeland Security. Each CWE entry describes a specific category of flaw that can lead to vulnerabilities — it is not a specific bug instance, but a class of bug.

CodeScan maps every finding to a CWE ID so you understand the nature of the risk, not just its location. The table below covers every CWE that CodeScan can report, organised by category.

Official reference: cwe.mitre.org — search any CWE ID for the full specification, examples, and related weaknesses.

Injection

CWE IDNameWhat it means
CWE-89SQL InjectionUser-controlled input is concatenated into a SQL query without parameterisation, allowing an attacker to alter the query structure, bypass authentication, extract data, or destroy tables.
CWE-564SQL Injection via HibernateSQL injection through ORM query methods where native queries or Criteria API accept unsanitised parameters.
CWE-943Improper Neutralization of Special Elements in Data Query LogicInjection into non-SQL query languages such as LDAP, XPath, NoSQL (MongoDB), or GraphQL.
CWE-79Cross-Site Scripting (XSS)Unvalidated user data is written into HTML output or the DOM, letting an attacker inject scripts that execute in a victim's browser — stealing cookies, credentials, or performing actions on behalf of the user.
CWE-87Improper Neutralization of Alternate XSS SyntaxXSS that survives partial sanitisation by using alternative encodings or lesser-known event attributes.
CWE-78OS Command InjectionUnsanitised input is passed to a system shell function (system(), exec(), subprocess), letting an attacker run arbitrary OS commands with the server's privileges.
CWE-77Command InjectionSimilar to CWE-78 but broader — covers injection into any interpreter, including SQL, LDAP, and OS shells.
CWE-94Code InjectionUser input is evaluated as code (eval(), exec() in Python/JS, unserialize() in PHP), giving attackers arbitrary code execution.
CWE-917Server-Side Template Injection (SSTI)User input is embedded in a template without sanitisation, letting an attacker execute expressions in the template engine context.
CWE-611Improper Restriction of XML External Entity (XXE)An XML parser processes external entity references supplied by an attacker, leaking server files or enabling SSRF.
CWE-91XML InjectionUser data is inserted into XML without encoding, allowing manipulation of XML structure or content.
CWE-1236Improper Neutralization of Formulas in CSV FilesUnsanitised data exported to CSV can contain formula injection that executes in spreadsheet applications.

Authentication & Session Management

CWE IDNameWhat it means
CWE-287Improper AuthenticationAuthentication logic can be bypassed — missing checks, trusting client-supplied identity, or logic errors that grant access without valid credentials.
CWE-307Improper Restriction of Excessive Authentication AttemptsNo rate limiting or lockout on login endpoints, enabling brute-force password attacks.
CWE-308Use of Single-Factor AuthenticationOnly one factor is required; NIST recommends multi-factor for sensitive operations.
CWE-384Session FixationAn application allows a session ID supplied by the attacker before authentication, letting the attacker hijack the session after login.
CWE-613Insufficient Session ExpirationSessions remain valid for too long or are not invalidated on logout, increasing the window for token theft.
CWE-521Weak Password RequirementsNo minimum length, complexity, or breach-detection policy allows trivially guessable passwords.
CWE-640Weak Password Recovery MechanismPassword reset flows rely on predictable tokens, security questions, or email-only verification without rate limiting.
CWE-620Unverified Password ChangePassword change does not require the current password, allowing account takeover if a session is stolen.
CWE-798Use of Hard-coded CredentialsUsernames or passwords are embedded in source code, configuration files, or container images and cannot be rotated without a code change.
CWE-259Use of Hard-coded PasswordA specific sub-case of CWE-798 focused on passwords embedded in code.

Cryptography

CWE IDNameWhat it means
CWE-327Use of a Broken or Risky Cryptographic AlgorithmDeprecated algorithms (MD5, SHA-1, DES, RC4, 3DES) provide insufficient security and can be broken with modern hardware.
CWE-328Use of Weak HashUnsalted MD5 or SHA-1 hashes of passwords are trivially reversed with rainbow tables.
CWE-330Use of Insufficiently Random ValuesPredictable random values (Math.random(), rand()) used in security contexts allow token forgery.
CWE-338Use of Cryptographically Weak PRNGA non-cryptographic PRNG is used where cryptographic randomness is required (tokens, keys, IVs).
CWE-326Inadequate Encryption StrengthKey sizes below modern recommendations (RSA < 2048-bit, AES < 128-bit) can be brute-forced.
CWE-321Use of Hard-coded Cryptographic KeyEncryption keys embedded in source code cannot be rotated and are exposed in version control.
CWE-325Missing Required Cryptographic StepOmitting key steps — initialisation vectors, salts, authentication tags — undermines security guarantees.
CWE-311Missing Encryption of Sensitive DataSensitive data (passwords, PII, tokens) stored or transmitted in plaintext.
CWE-312Cleartext Storage of Sensitive InformationPasswords, keys, or PII written to disk, logs, or databases without encryption.
CWE-319Cleartext Transmission of Sensitive InformationSensitive data sent over HTTP, unencrypted sockets, or FTP instead of TLS.
CWE-916Use of Password Hash With Insufficient Computational EffortFast hashing algorithms (MD5, SHA-256 without PBKDF2/bcrypt/Argon2) allow rapid offline cracking.

Access Control

CWE IDNameWhat it means
CWE-284Improper Access ControlResources are not correctly restricted by role or ownership — any authenticated (or even unauthenticated) user can access them.
CWE-285Improper AuthorizationThe system does not verify that an authenticated principal is authorised to perform the requested action.
CWE-862Missing AuthorizationNo access control check is performed before granting access to a sensitive function or resource.
CWE-863Incorrect AuthorizationAn authorisation check is present but evaluates the wrong condition, granting unintended access.
CWE-639Authorization Bypass Through User-Controlled KeyAn object reference (ID) is user-supplied; the application fetches the object without verifying ownership — IDOR.
CWE-732Incorrect Permission Assignment for Critical ResourceFiles, directories, or system resources have permissions that are too broad (world-readable secrets, 0777 directories).
CWE-269Improper Privilege ManagementProcesses retain elevated privileges longer than needed, or privilege escalation is not properly restricted.
CWE-276Incorrect Default PermissionsNewly created files or resources default to permissions that grant unintended access to other users or processes.

Path Traversal & File Handling

CWE IDNameWhat it means
CWE-22Path Traversal (../ Sequences)User-controlled input contains directory traversal sequences that escape the intended base path, exposing arbitrary files.
CWE-23Relative Path TraversalA relative path is constructed from user input without normalisation, allowing traversal to parent directories.
CWE-36Absolute Path TraversalAn absolute path supplied by the user directly accesses files outside the intended scope.
CWE-73External Control of File Name or PathFilenames or paths used in file operations are entirely controlled by user input.
CWE-434Unrestricted Upload of File with Dangerous TypeFile upload functionality does not restrict file types, allowing upload of executable scripts (webshells).
CWE-379Creation of Temporary File in Directory with Insecure PermissionsTemp files created in world-writable directories can be replaced by a symlink attack.

Sensitive Data Exposure & Logging

CWE IDNameWhat it means
CWE-200Exposure of Sensitive Information to an Unauthorized ActorError messages, stack traces, or responses leak internal paths, versions, or credentials.
CWE-209Generation of Error Message Containing Sensitive InformationException handlers return full stack traces or database error messages to the client.
CWE-532Insertion of Sensitive Information into Log FilePasswords, tokens, or PII are written to log files that may be accessible to lower-privileged staff.
CWE-359Exposure of Private Personal Information to an Unauthorized ActorPersonal data (SSN, medical records, financial info) accessible to parties not authorised to see it — GDPR risk.
CWE-214Invocation of Process Using Visible Sensitive InformationPasswords or secrets appear in process arguments visible via ps, /proc, or Task Manager.
CWE-540Inclusion of Sensitive Information in Source CodeAPI keys, database URLs, or internal hostnames committed to source control.

Input Validation & Sanitisation

CWE IDNameWhat it means
CWE-20Improper Input ValidationInput is accepted and used without sufficient validation — the root cause of a large proportion of all vulnerabilities.
CWE-116Improper Encoding or Escaping of OutputOutput is not encoded for its destination context (HTML, URL, SQL, shell), enabling injection attacks.
CWE-176Improper Handling of Unicode EncodingMulti-byte Unicode sequences bypass input validation or encoding, leading to injection or path traversal.
CWE-178Improper Handling of Case SensitivitySecurity decisions made on case-sensitive comparisons can be bypassed with alternate casing.
CWE-129Improper Validation of Array IndexArray indices from user input are not range-checked, enabling out-of-bounds reads or writes.
CWE-190Integer Overflow or WraparoundArithmetic on attacker-controlled integers wraps around, producing unexpected values used in buffer sizes or array indices.
CWE-191Integer Underflow (Wrap-around)Subtraction of unsigned integers wraps to a very large value, used as a size argument causing memory issues.
CWE-400Uncontrolled Resource ConsumptionUnrestricted input size, request rate, or recursive processing causes DoS by exhausting CPU, memory, or disk.
CWE-601Open RedirectUser-supplied URLs are used in redirect responses without validation, enabling phishing via trusted domain.

Deserialization & Object Injection

CWE IDNameWhat it means
CWE-502Deserialization of Untrusted DataDeserialising attacker-controlled data without type validation enables remote code execution via gadget chains. Java ObjectInputStream, Python pickle, PHP unserialize.
CWE-915Improperly Controlled Modification of Dynamically-Determined Object AttributesMass assignment — binding request parameters directly to object properties grants attackers control over sensitive fields.

Security Misconfiguration

CWE IDNameWhat it means
CWE-16ConfigurationBroad category for insecure default configurations — debug mode in production, permissive CORS, missing security headers.
CWE-693Protection Mechanism FailureA security control is present but misconfigured or bypassable — CSP with unsafe-inline, CSRF tokens not validated.
CWE-1004Sensitive Cookie Without HttpOnly FlagSession cookies missing HttpOnly can be read by JavaScript, enabling token theft via XSS.
CWE-614Sensitive Cookie Without Secure FlagSession cookies sent over HTTP in addition to HTTPS, enabling theft on mixed-content pages.
CWE-1008Weak Dependency or Build ProcessMissing security checks in build pipeline (npm audit, dependency pinning) allow supply-chain vulnerabilities to reach production.
CWE-494Download of Code Without Integrity CheckDependencies or plugins downloaded without hash or signature verification — open to supply-chain attacks.
CWE-1021Improper Restriction of Rendered UI Layers (Clickjacking)Missing X-Frame-Options or CSP frame-ancestors header allows the page to be embedded in an attacker's iframe.
CWE-352Cross-Site Request Forgery (CSRF)State-changing requests accepted without a CSRF token — attackers can forge requests from another origin.

Server-Side Request Forgery & Network

CWE IDNameWhat it means
CWE-918Server-Side Request Forgery (SSRF)The server fetches a URL supplied by the user, enabling attackers to reach internal services, cloud metadata endpoints (169.254.169.254), or localhost.
CWE-441Unintended Proxy or Intermediary (Confused Deputy)The application performs actions on behalf of the requester without verifying the requester's authority to access the target resource.

Memory Safety (C / C++)

CWE IDNameWhat it means
CWE-119Improper Restriction of Operations within the Bounds of a Memory BufferParent class for buffer overflows; reading or writing beyond allocated memory boundaries.
CWE-120Buffer Copy without Checking Size of Input (Classic Buffer Overflow)strcpy, gets, sprintf used without length checks allow stack/heap overflow.
CWE-125Out-of-bounds ReadReading past the end of a buffer leaks adjacent memory contents, potentially exposing keys or pointers.
CWE-787Out-of-bounds WriteWriting past the end of a buffer corrupts adjacent memory — common root cause of exploitable vulnerabilities (CISA KEV frequent flyer).
CWE-416Use After FreeMemory is freed but a pointer to it remains in use; subsequent writes corrupt heap metadata and can lead to code execution.
CWE-476NULL Pointer DereferenceA NULL pointer is dereferenced without a prior null check, causing a crash (DoS) or, in some contexts, privilege escalation.
CWE-415Double FreeFreeing the same memory block twice corrupts heap metadata, often leading to exploitable conditions.
CWE-401Missing Release of Memory after Effective Lifetime (Memory Leak)Memory is allocated but never freed, causing gradual resource exhaustion and eventual DoS.

Concurrency & Race Conditions

CWE IDNameWhat it means
CWE-362Race Condition (Concurrent Execution Using Shared Resource with Improper Synchronisation)Two or more threads access shared state without proper locking; outcome depends on scheduling, enabling TOCTOU attacks or data corruption.
CWE-367TOCTOU (Time-of-check Time-of-use)A security check (file permissions, balance) is performed at one time, but the resource is used at another — an attacker can change the resource in between.

Software & Supply-Chain Integrity

CWE IDNameWhat it means
CWE-494Download of Code Without Integrity CheckThird-party code fetched at build or runtime without signature/hash verification — open to supply-chain attacks.
CWE-829Inclusion of Functionality from Untrusted Control SphereLoading scripts, plugins, or packages from untrusted CDNs or registries without integrity checks.
CWE-1104Use of Unmaintained Third-Party ComponentsUnmaintained dependencies no longer receive security patches, accumulating known exploits over time.
CWE-1035OWASP Top Ten 2017 A9: Using Components with Known VulnerabilitiesDirect reference to the OWASP category; dependency has a published CVE.
Full CWE database

CodeScan detects over 80 distinct weakness classes. For the complete list of all 900+ CWE entries including mitigations, examples, and related CVEs, visit cwe.mitre.org/data/index.html. The authoritative CWE Top 25 Most Dangerous Software Weaknesses list is updated annually from NVD CVE data.