Lookup for vulnerable packages by Package URL.

GET /api/packages/1014484?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "url": "http://public2.vulnerablecode.io/api/packages/1014484?format=api",
    "purl": "pkg:pypi/lightrag-hku@1.4.7",
    "type": "pypi",
    "namespace": "",
    "name": "lightrag-hku",
    "version": "1.4.7",
    "qualifiers": {},
    "subpath": "",
    "is_vulnerable": true,
    "next_non_vulnerable_version": "1.4.14",
    "latest_non_vulnerable_version": "1.4.14",
    "affected_by_vulnerabilities": [
        {
            "url": "http://public2.vulnerablecode.io/api/vulnerabilities/89321?format=api",
            "vulnerability_id": "VCID-k8bh-w2h9-yygy",
            "summary": "lightrag-hku: JWT Algorithm Confusion Vulnerability\n## Summary\nThe 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.\n\n## Details\nIn `lightrag/api/auth.py` at line 128, the `validate_token` method calls:\n\n```python\npayload = jwt.decode(token, self.secret, algorithms=[self.algorithm])\n```\n\nThis 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.\n\n## PoC\nAn attacker can generate a JWT with the following structure:\n\n```json\n{\n  \"header\": {\n    \"alg\": \"none\",\n    \"typ\": \"JWT\"\n  },\n  \"payload\": {\n    \"sub\": \"admin\",\n    \"exp\": 1700000000,\n    \"role\": \"admin\"\n  }\n}\n```\n\nThen send a request like:\n\n```bash\ncurl -H \"Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwMDAwMDAwMCwicm9sZSI6ImFkbWluIn0.\" http://localhost:8000/api/protected-endpoint\n```\n\n## Impact\nAn attacker can impersonate any user, including administrators, by forging a JWT with 'alg': 'none', gaining full access to protected resources without needing valid credentials.\n\n## Recommended Fix\nExplicitly specify allowed algorithms and exclude 'none'. Modify the `validate_token` method to:\n\n```python\nallowed_algorithms = [self.algorithm] if self.algorithm != 'none' else ['HS256', 'HS384', 'HS512']\npayload = jwt.decode(token, self.secret, algorithms=allowed_algorithms)\n```\n\nOr better yet, hardcode the expected algorithm(s):\n\n```python\npayload = jwt.decode(token, self.secret, algorithms=['HS256'])\n```",
            "references": [
                {
                    "reference_url": "https://api.first.org/data/v1/epss?cve=CVE-2026-39413",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "0.00018",
                            "scoring_system": "epss",
                            "scoring_elements": "0.0511",
                            "published_at": "2026-06-06T12:55:00Z"
                        },
                        {
                            "value": "0.00018",
                            "scoring_system": "epss",
                            "scoring_elements": "0.05106",
                            "published_at": "2026-06-09T12:55:00Z"
                        },
                        {
                            "value": "0.00018",
                            "scoring_system": "epss",
                            "scoring_elements": "0.05064",
                            "published_at": "2026-06-08T12:55:00Z"
                        },
                        {
                            "value": "0.00018",
                            "scoring_system": "epss",
                            "scoring_elements": "0.05104",
                            "published_at": "2026-06-07T12:55:00Z"
                        },
                        {
                            "value": "0.00018",
                            "scoring_system": "epss",
                            "scoring_elements": "0.05124",
                            "published_at": "2026-06-05T12:55:00Z"
                        }
                    ],
                    "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-39413"
                },
                {
                    "reference_url": "https://github.com/HKUDS/LightRAG",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "4.2",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "MODERATE",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/HKUDS/LightRAG"
                },
                {
                    "reference_url": "https://github.com/HKUDS/LightRAG/commit/728f2e54509d93e0a44f929c7f83f2c88d6d291b",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "4.2",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "MODERATE",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/HKUDS/LightRAG/commit/728f2e54509d93e0a44f929c7f83f2c88d6d291b"
                },
                {
                    "reference_url": "https://github.com/HKUDS/LightRAG/security/advisories/GHSA-8ffj-4hx4-9pgf",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "4.2",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "MODERATE",
                            "scoring_system": "cvssv3.1_qr",
                            "scoring_elements": ""
                        },
                        {
                            "value": "MODERATE",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        },
                        {
                            "value": "Track*",
                            "scoring_system": "ssvc",
                            "scoring_elements": "SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2026-04-08T20:18:28Z/"
                        }
                    ],
                    "url": "https://github.com/HKUDS/LightRAG/security/advisories/GHSA-8ffj-4hx4-9pgf"
                },
                {
                    "reference_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-39413",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "4.2",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "MODERATE",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-39413"
                },
                {
                    "reference_url": "https://github.com/advisories/GHSA-8ffj-4hx4-9pgf",
                    "reference_id": "GHSA-8ffj-4hx4-9pgf",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "MODERATE",
                            "scoring_system": "cvssv3.1_qr",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/advisories/GHSA-8ffj-4hx4-9pgf"
                }
            ],
            "fixed_packages": [
                {
                    "url": "http://public2.vulnerablecode.io/api/packages/110430?format=api",
                    "purl": "pkg:pypi/lightrag-hku@1.4.14",
                    "is_vulnerable": false,
                    "affected_by_vulnerabilities": [],
                    "resource_url": "http://public2.vulnerablecode.io/packages/pkg:pypi/lightrag-hku@1.4.14"
                }
            ],
            "aliases": [
                "CVE-2026-39413",
                "GHSA-8ffj-4hx4-9pgf"
            ],
            "risk_score": 3.1,
            "exploitability": "0.5",
            "weighted_severity": "6.2",
            "resource_url": "http://public2.vulnerablecode.io/vulnerabilities/VCID-k8bh-w2h9-yygy"
        },
        {
            "url": "http://public2.vulnerablecode.io/api/vulnerabilities/90264?format=api",
            "vulnerability_id": "VCID-xtqk-kx6e-n7eh",
            "summary": "LightRAG: Hardcoded JWT Signing Secret Allows Authentication Bypass\nSubject: Security Vulnerability Report Hardcoded JWT Secret (CVE-2026-30762)\n\nHi HKUDS team,\n\nI'm writing to report a security vulnerability I discovered in LightRAG v1.4.10. This has been assigned CVE-2026-30762 by MITRE.\n\nVulnerability: Hardcoded JWT signing secret\nType: Improper Authentication (CWE-287)\nSeverity: High\nAttack Vector: Remote / Unauthenticated\n\nSummary:\nThe file lightrag/api/config.py (line 397) uses a default JWT secret \"lightrag-jwt-default-secret\" when the TOKEN_SECRET environment variable is not set. The AuthHandler in lightrag/api/auth.py (lines 24-25) uses this secret to sign and verify tokens. An unauthenticated attacker can forge valid JWT tokens using the publicly known default secret and gain access to any protected endpoint.\n\nReproduction:\n1. Install LightRAG v1.4.10 with AUTH_ACCOUNTS configured but no TOKEN_SECRET set\n2. Use PyJWT to sign a token: jwt.encode({\"sub\": \"admin\", \"role\": \"user\"}, \"lightrag-jwt-default-secret\", algorithm=\"HS256\")\n3. Send a request to any protected endpoint with the header: Authorization: Bearer <forged_token>\n4. Access is granted without valid credentials\n\nSuggested Fix:\nRequire TOKEN_SECRET to be explicitly set when AUTH_ACCOUNTS is configured. Refuse to start the API server if authentication is enabled but no custom secret is provided.\n\nI'm following a 90-day responsible disclosure timeline from today's date. Please let me know if you have any questions or need additional information.\n\nBest regards,\nVenkata Avinash Taduturi",
            "references": [
                {
                    "reference_url": "https://github.com/HKUDS/LightRAG",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "7.5",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "HIGH",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/HKUDS/LightRAG"
                },
                {
                    "reference_url": "https://github.com/HKUDS/LightRAG/security/advisories/GHSA-mcww-4hxq-hfr3",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "7.5",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "HIGH",
                            "scoring_system": "cvssv3.1_qr",
                            "scoring_elements": ""
                        },
                        {
                            "value": "HIGH",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/HKUDS/LightRAG/security/advisories/GHSA-mcww-4hxq-hfr3"
                },
                {
                    "reference_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-30762",
                    "reference_id": "CVE-2026-30762",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-30762"
                },
                {
                    "reference_url": "https://github.com/advisories/GHSA-mcww-4hxq-hfr3",
                    "reference_id": "GHSA-mcww-4hxq-hfr3",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "HIGH",
                            "scoring_system": "cvssv3.1_qr",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/advisories/GHSA-mcww-4hxq-hfr3"
                }
            ],
            "fixed_packages": [
                {
                    "url": "http://public2.vulnerablecode.io/api/packages/111551?format=api",
                    "purl": "pkg:pypi/lightrag-hku@1.4.13",
                    "is_vulnerable": true,
                    "affected_by_vulnerabilities": [
                        {
                            "vulnerability": "VCID-k8bh-w2h9-yygy"
                        }
                    ],
                    "resource_url": "http://public2.vulnerablecode.io/packages/pkg:pypi/lightrag-hku@1.4.13"
                }
            ],
            "aliases": [
                "CVE-2026-30762",
                "GHSA-mcww-4hxq-hfr3"
            ],
            "risk_score": 4.0,
            "exploitability": "0.5",
            "weighted_severity": "8.0",
            "resource_url": "http://public2.vulnerablecode.io/vulnerabilities/VCID-xtqk-kx6e-n7eh"
        }
    ],
    "fixing_vulnerabilities": [],
    "risk_score": "4.0",
    "resource_url": "http://public2.vulnerablecode.io/packages/pkg:pypi/lightrag-hku@1.4.7"
}