JQL Injection in Jira REST API allows unauthenticated users to access information only admin and sysadmins should access

Disclosed by
s3cur1t3
  • Engagement Atlassian
  • Disclosed date over 3 years ago
  • Points 10
  • Priority P3 Bugcrowd's VRT priority rating
  • Status Resolved This vulnerability has been accepted and fixed
Summary by Atlassian

JQL injection vulnerability in Jira Cloud

Summary by s3cur1t3

JQL Injection in the Jira REST API allows unauthenticated users to access information only admin and sysadmins should access. The REST API search function allows JQL to be submitted as part of the search.

An JQL injection attack, analogous to SQL Injection can be used to allow an unauthenticated user to access information normally restricted to admin and sysadmins only.

From the Jira REST API documentation (https://docs.atlassian.com/software/jira/docs/api/REST/8.9.0/#api/2/group-getUsersFromGroup) only admin or sysadmin users should be able to list the members in a group.

This attack allows an unauthenticated user to list members of a group.

How the attack works:

The JIRA search API is called with a specially crafted JQL query that:

causes an error (now() function almost certainly would return a value that would not match any id in the system)
executes the membersOf() function as part of the query expansion (this execution is what runs with more privileges internally to the query system)
due to the error in 1, and expansion in 2, returns the list of members.
An example would be to call https://bugbounty-test-s3cur1t3.atlassian.net/rest/api/2/search?jql=id%20in(membersOf(%22jira-software-users%22),now())
which lists all the group members of the jira-software-users group.

The same can be done for the jira-administrators group, which would allow an unauthenticated user to get a list of all the administrators, to be used in further attacks.

The same expansion can be used to also try to brute force likely group names such as QA-testers or Approvers or whatever.

This has now been fixed by Atlassian.

Activity