Skip to content
Business logic Write-up Beginner

Clock Skew - Time Can Change Anything

The web application trusted the client's system clock to enforce a 14-day free trial, so an attacker could change their local date backwards to regain trial days and access paid features without paying. The author demonstrated this by moving the system date back a week and successfully creating a survey that required a paid plan.

medium.com

Published on medium.com

A clock skew vulnerability occurs when a web application trusts the client’s system time (browser or OS time) for security decisions such as trial expiration, session validity, token expiry, license enforcement, rate limiting etc. If the application uses the client-provided timestamp instead of a server-controlled…

Jerry Shah (Jerry), on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the application used the client-provided timestamp to decide whether the trial had expired, instead of a server-controlled time source.

Impact

An attacker could bypass trial-period enforcement and gain unauthorised access to premium features, potentially causing financial loss through repeated abuse.

What the attacker needed

A free account; ability to change local system clock

The fix

Time-based enforcement decisions such as trial expiration should be calculated exclusively on the server using a trusted authoritative time source synchronised via NTP.

How it was found

  1. After the 14-day trial ended, log in and see the upgrade prompt.
  2. Try to create a new survey and receive a 'Your trial has ended' error.
  3. Open the system clock settings and turn off automatic time setting.
  4. Change the date backwards by several days and confirm.
  5. Reload the web application and observe that trial days remain.
  6. Create the pending survey successfully to confirm access.

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 write-up has not been written yet. The Original tab links to the source.

A free trial is meant to last a fixed number of days. This application checked the trial by looking at the date on the user's own computer instead of a trusted server clock. Because the user can change their computer's date, they could make the trial appear to still be active and keep using paid features for free.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.