CVE-2025-55149: Tiny scientist Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-rrgf-hcr9-jq6h
CWE-22
Published
Advisory Summary

CVE-2025-55149 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Tiny scientist libraries in the PyPI ecosystem. The issue involves tinyscientist has path traversal vulnerability in pdf review function (cwe-22). Remediation is available in the latest vendor maintenance releases.

CVE-2025-55149 at a Glance

CVE Identifier CVE-2025-55149
GHSA Identifier GHSA-rrgf-hcr9-jq6h
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Tiny scientist
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-55149

To remediate this vulnerability, upgrade all affected Tiny scientist dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tiny-scientist fixed: Latest secure release
pip install tiny-scientist>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show tiny-scientist

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-55149, inspect your installed packages using pip:

pip show tiny-scientist

Analyze the terminal output to locate any version of Tiny scientist in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show tiny-scientist command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Tiny scientist, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Description A critical path traversal vulnerability (CWE-22) has been identified in the `review_paper` function in `backend/app.py`. The vulnerability allows malicious users to access arbitrary PDF files on the server by providing crafted file paths that bypass the intended security restrictions. ## Impact This vulnerability allows attackers to: - Read any PDF file accessible to the server process - Potentially access sensitive documents outside the intended directory - Perform reconnaissance on the server's file system structure ## Vulnerable Code The issue occurs in the `review_paper` function around line 744: ```python if pdf_path.startswith("/api/files/"): # Safe path handling for API routes relative_path = pdf_path[len("/api/files/"):] generated_base = os.path.join(project_root, "generated") absolute_pdf_path = os.path.join(generated_base, relative_path) else: absolute_pdf_path = pdf_path # VULNERABLE: Direct use of user input ``` ## Proof of Concept ```bash curl -X POST http://localhost:5000/api/review \ -H "Content-Type: application/json" \ -d '{"pdf_path": "/etc/passwd"}' ``` ## Credit This vulnerability was discovered and reported by Ruizhe.

CVE-2025-55149 Affected Tiny scientist Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
tiny-scientist
PyPI
≤ 1.1.0

References

Frequently Asked Questions

What is CVE-2025-55149?
CVE-2025-55149 is a security vulnerability in Tiny scientist involving TinyScientist has Path Traversal Vulnerability in PDF Review Function (CWE-22) under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Tiny scientist versions are affected?
Affected versions include releases prior to current release patches across affected packages: tiny-scientist.
What version fixes CVE-2025-55149?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is tiny-scientist affected?
Yes, tiny-scientist is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-55149?
CVE-2025-55149 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2025-55149?
Run the dependency tree command: 'pip show tiny-scientist'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rrgf-hcr9-jq6h",
  "modified" : "2025-08-11T13:38:14Z",
  "published" : "2025-08-11T13:38:14Z",
  "aliases" : [ "CVE-2025-55149" ],
  "summary" : "TinyScientist has Path Traversal Vulnerability in PDF Review Function (CWE-22)",
  "details" : "## Description\nA critical path traversal vulnerability (CWE-22) has been identified in the `review_paper` function in `backend/app.py`. The vulnerability allows malicious users to access arbitrary PDF files on the server by providing crafted file paths that bypass the intended security restrictions.\n\n## Impact\nThis vulnerability allows attackers to:\n- Read any PDF file accessible to the server process\n- Potentially access sensitive documents outside the intended directory\n- Perform reconnaissance on the server's file system structure\n\n## Vulnerable Code\nThe issue occurs in the `review_paper` function around line 744:\n\n```python\nif pdf_path.startswith(\"/api/files/\"):\n    # Safe path handling for API routes\n    relative_path = pdf_path[len(\"/api/files/\"):]\n    generated_base = os.path.join(project_root, \"generated\")\n    absolute_pdf_path = os.path.join(generated_base, relative_path)\nelse:\n    absolute_pdf_path = pdf_path  # VULNERABLE: Direct use of user input\n```\n\n## Proof of Concept\n```bash\ncurl -X POST http://localhost:5000/api/review \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf_path\": \"/etc/passwd\"}'\n```\n\n## Credit\nThis vulnerability was discovered and reported by Ruizhe.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "tiny-scientist"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ulab-uiuc/tiny-scientist/security/advisories/GHSA-rrgf-hcr9-jq6h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55149"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ulab-uiuc/tiny-scientist/commit/7fd42873603012acb8c55a4fc3eaac9ab18e6559"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ulab-uiuc/tiny-scientist"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-11T13:38:14Z",
    "nvd_published_at" : "2025-08-09T03:15:47Z"
  }
}