| 제목 | piskvorky gensim <=4.4.0 rce |
|---|
| 설명 | Loading a gensim model file (the primary documented workflow — the tutorials distribute and load .model / .kv files) calls raw pickle.load on the file unconditionally, before any other logic:
# gensim/utils.py
@classmethod
def load(cls, fname, mmap=None): # :453 <- only param is mmap
...
compress, subname = SaveLoad._adapt_by_suffix(fname) # :483
obj = unpickle(fname) # :485 <- pickle runs HERE
obj._load_specials(fname, mmap, compress, subname) # :486 <- mmap used HERE (too late)
obj.add_lifecycle_event("loaded", fname=fname) # :487
return obj
def unpickle(fname): # :1445
...
with open(fname, 'rb') as f: # :1459
return _pickle.load(f, encoding='latin1') # :1460 *** RCE sink ***
A package-wide search for weights_only, allow_pickle, RestrictedUnpickler, safe_globals, find_class returns zero matches; a search for the words untrusted, unsafe, arbitrary, malicious across utils.py and the model loaders also returns zero matches — the load path carries no safety mechanism and no warning anywhere. |
|---|
| 원천 | ⚠️ https://github.com/piskvorky/gensim/issues/3663 |
|---|
| 사용자 | meraklbz (UID 87053) |
|---|
| 제출 | 2026. 08. 29. AM 04:51 (23 날 ago) |
|---|
| 모더레이션 | 2026. 09. 20. AM 10:31 (22 days later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 408020 [piskvorky gensim 까지 4.4.0 Model Loader gensim/utils.py load fname 권한 상승] |
|---|
| 포인트들 | 20 |
|---|