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

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions