Summary
The current dependency cap allows affected transformers versions to remain installable from the main requirements file:
- Current dependency line:
|
transformers>=4.27.1,<4.42 |
- Declared range:
transformers>=4.27.1,<4.42
- Resolver result checked from that range:
transformers==4.41.2
That resolved version is below the patched versions for these public advisories:
Source paths to review
The project has several local model bridges that load Transformers models or tokenizers with trust_remote_code=True, for example:
|
chatglm_tokenizer = AutoTokenizer.from_pretrained(_model_name_, trust_remote_code=True) |
|
model_path, trust_remote_code=True |
-
|
chatglm_tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) |
-
|
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) |
Local validation notes
With transformers==4.41.2, I reproduced the library-level behavior behind the two advisories in a local test environment:
- For GHSA-hxxf-235m-72v3, the TransfoXL tokenizer pickle path was blocked in the default mode, but reached a synthetic local marker payload when trusted remote-code mode was enabled.
- For GHSA-jjph-296x-mrcr,
get_imports() showed rapidly increasing runtime on crafted input: about 0.037s at size 100, 0.808s at size 500, 2.835s at size 1000, and timeout at size 2000 in the local bounded probe.
This report is scoped to the vulnerable dependency cap plus the current source paths that opt into trusted Transformers model code. It is not a claim of a full unauthenticated application exploit.
Suggested fix
Please consider removing the <4.42 cap and requiring a Transformers version at or above 4.51.0 if compatible, or another current compatible release line that includes the fixes above. The optional ChatGLM4 requirements file already has a looser transformers>=4.44 line, so it may also be worth aligning the main requirements with the maintained path.
Summary
The current dependency cap allows affected
transformersversions to remain installable from the main requirements file:gpt_academic/requirements.txt
Line 11 in d6bde0f
transformers>=4.27.1,<4.42transformers==4.41.2That resolved version is below the patched versions for these public advisories:
Source paths to review
The project has several local model bridges that load Transformers models or tokenizers with
trust_remote_code=True, for example:gpt_academic/request_llms/bridge_chatglm.py
Line 36 in d6bde0f
gpt_academic/request_llms/bridge_chatglm3.py
Line 30 in d6bde0f
gpt_academic/request_llms/bridge_chatglm3.py
Line 35 in d6bde0f
gpt_academic/request_llms/bridge_chatglm4.py
Line 31 in d6bde0f
gpt_academic/request_llms/bridge_chatglm4.py
Line 36 in d6bde0f
gpt_academic/request_llms/bridge_deepseekcoder.py
Line 39 in d6bde0f
Local validation notes
With
transformers==4.41.2, I reproduced the library-level behavior behind the two advisories in a local test environment:get_imports()showed rapidly increasing runtime on crafted input: about 0.037s at size 100, 0.808s at size 500, 2.835s at size 1000, and timeout at size 2000 in the local bounded probe.This report is scoped to the vulnerable dependency cap plus the current source paths that opt into trusted Transformers model code. It is not a claim of a full unauthenticated application exploit.
Suggested fix
Please consider removing the
<4.42cap and requiring a Transformers version at or above 4.51.0 if compatible, or another current compatible release line that includes the fixes above. The optional ChatGLM4 requirements file already has a loosertransformers>=4.44line, so it may also be worth aligning the main requirements with the maintained path.