6 min

CVE & CWE: understanding and anticipating critical vulnerabilities

Published in
29.04.2025
CVE & CWE : comprendre et anticiper les vulnérabilités critiques
Subscribe to the newsletter

In 2024, more than 40,000 new CVEs were recorded, including 768 vulnerabilities actively exploited, representing a 20% increase compared to the previous year.

CERTs have issued an increasing number of alerts regarding critical, remotely exploitable vulnerabilities. Given these growing threats, understanding the complementary nature of CVEs (Common Vulnerabilities and Exposures) and CWEs (Common Weakness Enumeration) is essential.

In this article, we explore their roles, how they interact, and strategies to anticipate, detect, and block these risks.

1. Understanding CVEs

Common Vulnerabilities and Exposures (CVE) is a standardized system used to identify and catalog known security flaws. Created in 1999 by the MITRE Corporation, this international registry enables centralized vulnerability management, ensuring effective communication between cybersecurity researchers, software vendors, and corporate IT teams.

1.1. What is a CVE?

A CVE is a security flaw that has been cataloged and documented with a unique identifier. This format follows the CVE-YYYY-NNNNN nomenclature, where:
• YYYY represents the year of discovery,
• NNNNN is a sequential number assigned to the vulnerability.

Each CVE contains essential information, including:
• A description of the vulnerability and its potential impact,
• The affected software versions,
• Patches and recommendations for mitigating the risk.

However, a CVE does not provide detailed technical information on how to exploit the vulnerability. It serves primarily to reference and report a vulnerability.

1.2. How is a CVE assigned?

The process for publishing a CVE involves several key steps:
• Vulnerability discovery. A vulnerability can be detected by a cybersecurity researcher, a software vendor, a company, or an ethical hacker.

• Validation by a CVE Numbering Authority (CNA). CNAs are entities authorized to assign CVE IDs. These can be organizations like Microsoft, Google, Red Hat, or government agencies. They ensure the vulnerability is legitimate and has not already been cataloged.

• Assignment of a unique identifier. If the vulnerability is validated, it receives a CVE ID and is added to the official database.

• Analysis and enrichment by the National Vulnerability Database (NVD). The NVD, managed by the NIST (National Institute of Standards and Technology), enriches the CVE with a CVSS (Common Vulnerability Scoring System) score, which allows for assessing its severity on a scale of 0 to 10. It also adds technical details, references, and links to patches.

1.3. Why are CVEs essential in cybersecurity?

1. Initial connection – The attacker opens a connection to the target server and sends a complete HTTP POST header, including the Content-Length field, which indicates the size of the incoming message body.
2. Sending data at an extremely low rate – Instead of sending the message body immediately, the attacker transmits it very slowly, for example, one byte every two minutes.
3. Maintaining the connection – Following protocol specifications, the server keeps the connection open while waiting for the data to be fully received. During this time, the resources associated with that connection remain tied up.
4. Multiplying connections – The attacker repeats this process across multiple simultaneous connections, gradually exhausting the server's resources.

2. Understanding CWEs

While CVEs (Common Vulnerabilities and Exposures) identify specific vulnerabilities in computer systems, CWEs (Common Weakness Enumeration) focus on the root causes of these flaws. They catalog structural weaknesses in code, configurations, or architectures that can be exploited by attackers.

In other words, a CVE describes a specific, already detected and documented problem, whereas a CWE highlights the poor practices or design errors that lead to the emergence of these vulnerabilities.

Example: CVE-2021-44228, better known as Log4Shell, is a critical vulnerability affecting Log4j. It is linked to CWE-502 (Deserialization of Untrusted Data), a weakness that allows for remote code execution.

2.2 Main CWE categories

Software weaknesses

These CWEs concern development and programming errors that expose an application to attacks.

CWE-89 : SQL Injection → Allows an attacker to execute malicious queries in a database.
CWE-79 : Cross-Site Scripting (XSS) → Injects malicious code into users' browsers.
CWE-20 : Improper Input Validation → The application accepts unverified data that can trigger unexpected behavior.

Example: In 2017, Equifax suffered a massive data breach due to a vulnerability linked to CWE-502 (Deserialization of Untrusted Data), allowing attackers to execute malicious code remotely.

System weaknesses

These CWEs concern errors related to system architecture, configurations, or protocols.

CWE-284 : Improper access control → Users can access resources they should not be able to see.
CWE-400 : Denial of Service (DoS) attacks → Flaws that allow an attacker to make a service unusable.
CWE-311 : Missing encryption of sensitive data → Information sent without encryption, exposing data to interception.

Example:In 2019, a vulnerability in WhatsApp allowed for the installation of spyware via a simple phone call, exploiting a flaw classified under CWE-119 (improper restriction of operations within the bounds of a memory buffer).

Configuration weaknesses

These CWEs concern configuration errors in applications, networks, and systems.

CWE-16 : Insufficient security configuration → Poorly secured settings that leave a system vulnerable.
CWE-200 : Exposure of sensitive information to an unauthorized actor → Configuration files that are publicly accessible.
CWE-319 : Cleartext transmission of sensitive information → Passwords stored in plain text within a configuration file.

Example: In 2021, misconfigured databases (MongoDB, Elasticsearch) exposed millions of customer records to public access due to CWE-200.

2.3 Why are CWEs essential for security?

CWEs play a central role in securing applications and infrastructure. By identifying weaknesses early on, they enable:

✔ A proactive approach to cybersecurity: rather than simply patching known vulnerabilities (CVEs), CWEs help eliminate poor practices right from the design phase.
✔ Better risk management: by classifying weaknesses according to their criticality, they allow for the prioritization of remediation efforts and a reduction in the attack surface.
✔ Regulatory compliance: many cybersecurity standards (ISO 27001, NIS2, DORA) recommend adopting an approach based on weakness management (CWE).
✔ Continuous improvement of development practices: CWEs are widely used in static code analysis tools and DevSecOps training to help developers avoid critical errors.

2.4 CVE & CWE: an essential complementarity

When a security flaw is identified (CVE), it almost always originates from a known and classified weakness (CWE). This relationship is essential for preventing vulnerabilities, as fixing a CWE helps prevent the emergence of multiple associated CVEs.

📌 In summary:
• CVEs alert you to known and sometimes exploitable vulnerabilities,
• CWEs allow you to anticipate and eliminate structural weaknesses before a CVE is ever discovered.

Example: Log4Shell (CVE-2021-44228)

Context : Log4Shell is a critical vulnerability in the Log4j library that allows for remote code execution via manipulated logs.
Associated CWE : CWE-502 (Deserialization of Untrusted Data)
Impact : Massive exploitation, compromising millions of servers.
Why did this vulnerability exist? The library did not properly validate inputs, allowing attackers to inject malicious code.

Benefits of CVEs

• Discovery of unidentified vulnerabilities : Testing for CWE-related weaknesses helps uncover design or coding flaws that have not yet been identified or published as CVEs. If left unpatched, these weaknesses can lead to security vulnerabilities.
• Broader and proactive testing : CWE-based testing allows you to test for security issues at the architectural or code level before a specific vulnerability (CVE) is discovered and exploited. It is a more comprehensive and preventive approach.
• Compliance with security best practices : Testing for CWEs helps improve the overall security of your code by detecting common errors such as improper input validation, incorrect session management, or access control issues.

Benefits of CWEs

• Targeted and documented testing : These vulnerabilities are linked to software, specific versions, or configurations already known to have identified and documented weaknesses.
• Immediate and real risks : CVEs are vulnerabilities that have been discovered and that attackers may potentially already be taking advantage of.
• Resource availability : CVEs are sometimes accompanied by exploits, which makes it possible to test the vulnerability precisely and assess its impact directly.

3. How to detect and protect against CVEs and CWEs?

Managing vulnerabilities (CVEs) and structural weaknesses (CWEs) is essential for ensuring the security of IT systems. An effective approach relies on proactive threat detection, rigorous prevention, and the use of advanced protection solutions.

3.1 Methods for detecting CVEs

Since CVEs are documented and referenced vulnerabilities, there are several methods for identifying them before they are exploited:

Benefits of CVEs

Automated scanning solutions can detect known vulnerabilities affecting systems and applications. These tools analyze infrastructure and applications to identify known flaws and recommend appropriate corrective measures.

Consulting public databases

Continuous monitoring and regular database updates help anticipate attacks before they impact infrastructure. Centralized databases track new CVEs in real time:

• NVD (National Vulnerability Database): maintained by NIST, it provides detailed information on each vulnerability.
• MITRE CVE Database : the official reference source for CVEs, featuring precise technical descriptions.
• KEV (Known Exploited Vulnerabilities): a list of actively exploited vulnerabilities used by the CISA government agency.

Patch management and regular updates

Many major attacks, such as WannaCry, exploited vulnerabilities for which a patch already existed. Promptly updating systems could have prevented massive losses.

✔ Quickly fixing known flaws through software updates is a key cybersecurity practice.
✔ Automating patch management ensures rapid remediation and limits the risk of a critical CVE being exploited.

3.2 Methods for preventing CWEs

Unlike CVEs, which are specific vulnerabilities that have already been exploited, CWEs concern structural weaknesses. Preventing them requires a proactive approach to development and application security:

✔ Apply secure coding principles: limit SQL injection (CWE-89), avoid memory leaks (CWE-119),
✔ Follow OWASP Top 10 recommendations to prevent the most common vulnerabilities,
✔ Implement a strict access management policy to avoid credential compromise,
✔ Integrate security from the design phase (Shift Left Security),
✔ Conduct regular code reviews and security tests to identify potential flaws before deployment,
✔ Promote DevSecOps, which integrates security testing into CI/CD pipelines.

Penetration Testing (Pentest)

A pentest is often used to identify vulnerabilities that are not documented by a CVE. The goal is to explore the application using various attack techniques and following standardized methodologies to spot flaws:

• SQL Injection: test input fields to verify if the application is vulnerable to SQL injections.
• Cross-Site Scripting (XSS): test if the application exposes flaws that allow for the injection of malicious JavaScript code.
• Access Control: verify if users can access restricted data or actions (authentication or authorization issues).
• CSRF (Cross-Site Request Forgery): test if an application allows an attacker to manipulate the application's state via HTTP requests.

Vulnerability Scanning

Even if a vulnerability is not linked to a CVE, many security tools, such as DAST (Dynamic Application Security Testing), are capable of detecting common security flaws that are not referenced in CVEs. Methodologies like the OWASP Top 10 allow for testing the most common vulnerabilities in web applications, even if they are not directly associated with CVEs.

• Configuration weaknesses: for example, errors in HTTP headers, or excessive permissions on files or directories,
• Programming errors: such as issues with input validation or session management,
• Poor security practices: such as using outdated library versions, even if they are not necessarily associated with a CVE,
• Poor user input management: which can lead to attacks such as SQL injection or XSS,
• Session and authentication security management: poor password management practices, for example.

Code review and static analysis

If you have access to the application's source code, you can perform static code analysis to detect potential vulnerabilities. These SAST (Static Application Security Testing) tools analyze the code to identify weaknesses such as potential SQL injections, data leaks, or issues related to credential management.

Security monitoring

Even without a CVE, a vulnerability can be discovered by the community or through specific research. Regularly monitoring sites like Exploit-DB or security forums can help you identify emerging vulnerabilities that are not yet associated with a CVE but could pose a risk to your systems.

4. The Activ Security solution for monitoring CVEs & CWEs

The Activ Security platform offers a comprehensive approach to monitoring, analyzing, and protecting digital services against CVEs and CWEs:

Real-time vulnerability monitoring (CVE & CWE)

• Proactive CVE detection using an advanced external attack surface analysis engine,
• Correlation between CVEs and CWEs to identify structural weaknesses,
• Dynamic testing of CWEs, particularly those related to the OWASP Top 10,
• Detailed alerts and reports to prioritize remediation actions.

Advanced application protection

• Proactive CVE detection using an advanced external attack surface analysis engine,
• Correlation between CVEs and CWEs to identify structural weaknesses,
• Dynamic testing of CWEs, particularly those related to the OWASP Top 10,
• Detailed alerts and reports to prioritize remediation actions.

Patch management and regular updates

• Dynamic filtering of malicious IPs to neutralize attacks upstream,
• Web Application Firewall (WAF) to block attacks exploiting known vulnerabilities (IPS, blocklist, dynamic security rules),
• Advanced AI-driven behavioral analysis: anomaly detection based on behavioral patterns,
• Zero-Day protection by analyzing suspicious behavior and automatically adapting defense rules.

Managing CVEs and CWEs is a key challenge for strengthening corporate cybersecurity. While CVEs allow for the identification and remediation of specific vulnerabilities, CWEs offer a broader approach by targeting underlying structural weaknesses.

‍