Skip to content
Crypto Advisory Intermediate CVE-2023-28641

GHSL-2023-030: Session Forgery in Autolab - CVE-2023-28641

Autolab's default Docker setup used a static secret_key_base shared across all instances, allowing attackers to forge session cookies and impersonate admin users. An attacker with a valid account could modify their cookie to use the 'act as user' feature and gain admin privileges.

p Follow

Originally disclosed on GitHub Security Lab

Autolab did not enforce a unique, secure secretkeybase for the default docker-based production setup. If no secretkeybase was set, Autolab fell back to a static secretkeybase that was the same for all instances.

p-, on GitHub Security Lab

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

How it worked

Root cause

The application used a hardcoded, shared secret_key_base as a fallback when no environment variable was set, and the recommended Docker setup did not require setting a unique secret.

Impact

This issue may lead to Elevation of privilege through user/admin impersonation. It may also lead to Remote Code Execution (RCE) by unprivileged users on systems that are not patched against CVE-2022-41955.

What the attacker needed

A valid account on the Autolab instance; default Docker setup without custom secret_key_base

The fix

The vulnerability was fixed by requiring a unique secret_key_base for production setups.

How it was found

  1. Obtain a valid account on an Autolab instance.
  2. Decrypt your own session cookie using the known static secret_key_base.
  3. Modify the cookie to include a sudo value with the target user_id and course_id.
  4. Re-encrypt and sign the cookie with the same secret_key_base.
  5. Use the forged cookie to access the application as the impersonated user.

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 secret key is used to sign and encrypt session cookies, which prove who you are. If that key is the same for every installation, anyone who knows it can create fake cookies that look legitimate. Here, the default setup used a fixed key, so an attacker could craft a cookie claiming to be an administrator.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by p

View all

49 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.