VYPR
Critical severityNVD Advisory· Published Nov 23, 2021· Updated Aug 4, 2024

Arbitrary file reading vulnerability in Aim

CVE-2021-43775

Description

Aim is an open-source, self-hosted machine learning experiment tracking tool. Versions of Aim prior to 3.1.0 are vulnerable to a path traversal attack. By manipulating variables that reference files with “dot-dot-slash (../)” sequences and its variations or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system including application source code or configuration and critical system files. The vulnerability issue is resolved in Aim v3.1.0.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
aimPyPI
< 3.1.03.1.0

Affected products

1

Patches

1
b9e53df5e32d

Security issue fix for `/static-files/{path}` endpoint (#1003)

https://github.com/aimhubio/aimmihran113Nov 15, 2021via ghsa
1 file changed · +9 1
  • aim/web/api/views.py+9 1 modified
    @@ -1,15 +1,23 @@
     import os
    +from pathlib import Path
     
     from aim.web.api.utils import APIRouter  # wrapper for fastapi.APIRouter
     from fastapi.responses import FileResponse
    +from fastapi import HTTPException
     
     statics_router = APIRouter()
     
     
     @statics_router.get('/static-files/{path:path}/')
     async def serve_static_files(path):
         from aim import web
    -    static_file_name = os.path.join(os.path.dirname(web.__file__), 'ui', 'build', path)
    +    static_files_root = os.path.join(os.path.dirname(web.__file__), 'ui', 'build')
    +    static_file_name = '/'.join((static_files_root, path))
    +
    +    # check if path is leading inside ui/build directory
    +    if not Path(static_files_root) in Path(static_file_name).resolve().parents:
    +        raise HTTPException(404)
    +
         compressed_file_name = '{}.gz'.format(static_file_name)
         if os.path.exists(compressed_file_name):
             return FileResponse(compressed_file_name, headers={'Content-Encoding': 'gzip'})
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.