Skip to content

[Bug]: The MapDataManager function uses pickle to serialize the data_map.txt file which may lead to security risks. #655

Description

@lihao7212148

Current Behavior

When MapDataManager is initialized, pickle is called to read the data_map.txt file. If an attacker tampered with the data_map.txt file, this may lead to security risks and the python open source community has stated that pickle is an unsafe function.
image

gptcache use pickle code as blow:
image

Expected Behavior

expected do not ues pickle or Verify whether the file content has been tampered

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions