Skip to content

Commit 21eb99d

Browse files
committed
Fixed #551 by validating the server side is configured to allow pickle and bumped version for major release to 6.
1 parent 19a9f03 commit 21eb99d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Diff for: CHANGELOG.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
6.0.0
2+
=====
3+
Date: 2024-02-23
4+
5+
- `#551`_ Resolves security issue that results in RCE. The fix breaks backwards compatibility for those that rely on the `__array__` attribute used by `numpy`. This RCE is only exploitable when the server-side gets the attribute `__array__` and calls it (e.g., `np.array(x)`). This issues effects all versions since major release 4.
6+
7+
.. _#551: https://github.com/tomerfiliba-org/rpyc/issues/551
8+
19
5.3.1
210
=====
311
Date: 2023-02-21

Diff for: rpyc/core/netref.py

+3
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ def method(self, start, stop, *args):
251251
def __array__(self):
252252
# Note that protocol=-1 will only work between python
253253
# interpreters of the same version.
254+
if not object.__getattribute__(self,'____conn__')._config["allow_pickle"]:
255+
# Security check that server side allows pickling per #551
256+
raise ValueError("pickling is disabled")
254257
return pickle.loads(syncreq(self, consts.HANDLE_PICKLE, -1))
255258
__array__.__doc__ = doc
256259
return __array__

Diff for: rpyc/version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '5.3.1'
1+
__version__ = '6.0.0'
22
version = tuple(__version__.split('.'))
3-
release_date = "2023-02-21"
3+
release_date = "2024-02-23"

0 commit comments

Comments
 (0)