Fix remember-me cookie forgery via predictable signature bypass#2
Draft
Fix remember-me cookie forgery via predictable signature bypass#2
Conversation
…akeTokenSignature When UserSeedProperty is null, the method previously returned the static string "no-prop" directly, bypassing HMAC signature computation entirely. This allowed attackers to forge remember-me cookies by using "no-prop" as the signature for any user whose UserSeedProperty was absent. Fix: Use "no-prop" as the seed value but still compute the HMAC signature, ensuring the token always includes cryptographic material that cannot be predicted without knowledge of the server-side secret key. Co-authored-by: DominicBreuker <[email protected]>
Copilot
AI
changed the title
[WIP] Fix critical authentication bypass vulnerability in code base
Fix remember-me cookie forgery via predictable signature bypass
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TokenBasedRememberMeServices2.makeTokenSignature()returns the static string"no-prop"whenUserSeedPropertyis null, completely bypassing HMAC computation. An attacker can forge a valid remember-me cookie for any affected user with justbase64(username:expiryTime:no-prop).Vulnerability
The
processAutoLoginCookiepath compares the attacker-supplied signature against the output ofmakeTokenSignature(). When both are the literal string"no-prop", authentication succeeds — no secret material involved.CVSS 9.8 — Network-exploitable, no auth required, no user interaction, full impersonation of any user whose
UserSeedPropertyis absent.Fix
TokenBasedRememberMeServices2.java: Replacereturn "no-prop"withuserSeed = "no-prop"so the value flows throughMAC.mac(token)like all other code paths. The signature now always requires the server-side HMAC key.TokenBasedRememberMeServices2Test.java: Added test that crafts a forged cookie with"no-prop"as the signature and asserts it is rejected.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
repo.jenkins-ci.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -Xmx1400m -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/jenkins/jenkins org.codehaus.plexus.classworlds.launcher.Launcher -pl core -am compile -q -DskipTests 5sum md5sum nfig/composer/vendor/bin/md5sum md5sum(dns block)www.jenkins.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.