Skip to content

TypeError for CREATE_ORG with spoofed CVE-API-ORG header #1666

@ElectricNroff

Description

@ElectricNroff

mw.onlySecretariat,
mw.validateUser,
parseError,
parsePostParams,
controller.CREATE_ORG

the middleware is in an unexpected order (checking for Secretariat role before authentication). Here, isSecretariatByShortName will be called on any string in the CVE-API-ORG HTTP request header, even if the organization does not exist. Then, org.authority.includes('SECRETARIAT') is called on the null result, leading to TypeError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Low Priority

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions