Resolves issue #1775, Fix vulnerability where the inUse lock is stripped during organization updates.#1794
Merged
david-rocca merged 5 commits intoupdated_ur_fieldsfrom May 1, 2026
Merged
Conversation
cberger8
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes Issue #1775
Summary
This PR addresses a vulnerability where non-sequential CVE ID reservations could bypass CVE ID quotas. Specifically, the
inUse(andin_use) property, which acts as a lock during reservations, was not protected during organization updates. As a result, when an admin calledPUT /api/registry/org/:shortname, theinUseproperty was overwritten and removed, prematurely clearing the lock. This PR addsinUseandin_useto the protected fields list to ensure the lock is preserved across updates.Important Changes
src/repositories/baseOrgRepositoryHelpers.jsinUseandin_useto theprotectedFieldsarray inprocessJointApprovalAndMergeto prevent them from being overwritten and dropped during organization updates.test/integration-tests/registry-org/registryOrgCRUDTest.jsPreserves inUse and in_use properties across updatesto verify that theinUseandin_useflags remain intact after aPUT /api/registry/org/:shortnameupdate.Testing
Steps to manually test updated functionality, if possible:
PUT /api/registry/org/:shortnamerequest.PUTrequest does not clear theinUseflag in the MongoDB document mid-reservation.npm run test:integration).Notes
inUse) and registry (in_use) fields were explicitly protected to ensure backwards and forwards compatibility across schemas.