cybersecurity · intermediate · ~15 min · safe pentest lab

Valid CVE id?

Validate a structured identifier.

Challenge

Implement int is_cve_id(const char *s) returning 1 if s matches CVE-<4 digits>-<1 or more digits>, else 0.

Starter code

#include <string.h>

int is_cve_id(const char *s) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.