Language: TypeScript
Label: vulnerable
CWE: CWE-269 \u2014 Improper Privilege Management
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.

Code:
    const submit = () => {
        dispatch({ type: "notification/dismiss" });
        if (!validateInputs(value)) {
            return;
        }
        dispatch(fetchEndUserEvent(value));
    };