Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(vuln-88): do not validate JWT for locked users

Tre Dubravaefd065721f0a
diff --git a/backend/src/services/auth-token/auth-token-service.ts b/backend/src/services/auth-token/auth-token-service.ts
index c15444f76d..b1892d89ba 100644
--- a/backend/src/services/auth-token/auth-token-service.ts
+++ b/backend/src/services/auth-token/auth-token-service.ts
@@ -290,6 +290,10 @@ export const tokenServiceFactory = ({ tokenDAL, userDAL, orgDAL, keyStore }: TAu
);
if (!user || !user.isAccepted) throw new NotFoundError({ message: `User with ID '${session.userId}' not found` });
+ if (user.isLocked || (user.temporaryLockDateEnd && new Date() < user.temporaryLockDateEnd)) {
+ throw new UnauthorizedError({ message: "Account is locked" });
+ }
+
let orgId = "";
let orgName = "";
let rootOrgId = "";