Nautobot GitRepository current_head Field Writable via REST API (CVE-2026-44798)
A user with permissions to modify GitRepository records can manipulate the `current_head` field via the REST API in Nautobot, leading to repository state desynchronization or unavailability; this is remediated in versions 2.4.33 and 3.1.2.
A vulnerability exists in Nautobot versions prior to 2.4.33 and between 3.0.0a2 and 3.1.2 that allows users with the ability to add or change GitRepository records to manipulate the current_head field through the REST API. This field, intended for internal use, dictates the commit hash that Nautobot’s local clone of the repository checks out. By directly modifying this field, an attacker can force the local repository to an arbitrary state, potentially checking out an older commit, a non-existent commit, or a malformed value. This can lead to incorrect or misleading infrastructure state within Nautobot and may require manual intervention to resolve. The vulnerability, identified as CVE-2026-44798, was addressed in Nautobot versions 2.4.33 and 3.1.2.
Attack Chain
- An attacker authenticates to the Nautobot REST API with credentials that have permissions to modify GitRepository records.
- The attacker identifies a GitRepository record they wish to manipulate.
- The attacker crafts a REST API PUT or PATCH request to the GitRepository endpoint.
- The request includes a modified
current_headfield containing a commit hash value. This value may be an older commit hash, a nonexistent commit hash, or a malformed string. - Nautobot processes the API request and updates the
current_headfield of the specified GitRepository record with the attacker-supplied value. - Nautobot’s background processes attempt to synchronize the local Git repository clone with the updated
current_head. - Depending on the value of
current_head, the synchronization either checks out the specified commit, fails due to an invalid commit, or corrupts the local repository. - The attacker achieves the objective of desynchronizing Nautobot’s view of the repository state or rendering the repository unusable.
Impact
Successful exploitation of CVE-2026-44798 can cause Nautobot’s view of network infrastructure to become inconsistent with the actual state represented in the Git repository. This can lead to misconfiguration, failed automation tasks, and general operational disruption. In the worst-case scenario, manual intervention is required to correct the current_head value and resynchronize the repository. The number of affected installations is unknown, but any Nautobot instance with users who can modify GitRepository objects is potentially vulnerable.
Recommendation
- Upgrade Nautobot to version 2.4.33 or 3.1.2 to address CVE-2026-44798.
- Review and restrict user permissions to create and modify GitRepository records, as suggested in the advisory workaround.
- Implement the detection rule “Detect Direct Modification of Nautobot GitRepository current_head via API” to monitor for unauthorized changes to the
current_headfield via the REST API. - Monitor webserver logs for PATCH or PUT requests to the
/api/extras/git-repositories/<id>/endpoint that contain thecurrent_headparameter, using a rule similar to “Detect API Requests to Modify Nautobot GitRepository current_head”.
Detection coverage 2
Detect API Requests to Modify Nautobot GitRepository current_head
highDetects CVE-2026-44798 exploitation — PUT/PATCH requests to the Nautobot GitRepository API endpoint with a 'current_head' parameter, indicating a potential attempt to directly modify the field.
Detect Direct Modification of Nautobot GitRepository current_head via API
mediumDetects CVE-2026-44798 exploitation — Audit logs showing a user directly modifying the `current_head` field of a GitRepository object via the API.
Detection queries are available on the platform. Get full rules →