Skip to content
CSRF Disclosed report Beginner

Improper Cookie expiration | Cookies Expiration Set to Future

The application sets persistent cookies for session identifiers and CSRF tokens with future expiration dates. An attacker who obtains these cookies could reuse them to impersonate the victim, though the report does not demonstrate how such theft would occur.

sadhu16 Follow

Originally disclosed on HackerOne

  • Fixed in 5 days
  • Disclosed after 3 months

Hi Team, I have found at many instances or places from signup till getting logged into application ( in domain "demo.weblate.org" ) that session maintaining cookies such as csrf token and session id's expiration dates are set to future date. As part of secure session management one should prohibit or avoid the use of persistent cookies specially for those cookies which contain sensitive information.Ideally application should use only cookies of non persistent nature.

Here Application is setting cookie expiration to future date.

Here an adversary may get an access to victim's cookies (session ids and csrf token ) and can reuse them in further getting valid session on behalf of them or he can directly use them for any activity which cause harm to victims.

Attached screenshots for reference please see them.

See the below mentioned link for details:

https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OTG-SESS-002)

Attachments

Session_Id_expiration_date_is_set_to_future_date.png
Session_Id_expiration_date_is_set_to_future_date.png From the original on HackerOne
Session_Id_expiration_date_is_set_to_future_date-1.png
Session_Id_expiration_date_is_set_to_future_date-1.png
Session_Id_expiration_date_is_set_to_future_date-2.png
Session_Id_expiration_date_is_set_to_future_date-2.png
Session_Id_expiration_date_is_set_to_future_date-3.png
Session_Id_expiration_date_is_set_to_future_date-3.png

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

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 application sets an explicit future expiry on session and CSRF cookies instead of making them session-scoped.

Impact

An attacker who obtains the cookies could reuse them to act as the victim, but the report does not show how the cookies would be stolen.

What the attacker needed

Attacker must first obtain the victim's cookies

The fix

The application should use non-persistent session cookies for sensitive data such as session identifiers and CSRF tokens.

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.

Cookies are small pieces of data a website stores in your browser to remember who you are. A 'persistent' cookie stays on your computer after you close the browser, so if someone steals it they can pretend to be you for a long time. This report says the site should use temporary cookies instead, but it does not show how an attacker would actually steal them.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by sadhu16

View all

6 more disclosed reports, best first.

More from Weblate

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.