Skip to content

[Aikido] Fix 4 security issues in fonttools, scipy - #25

Draft
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-109452118-8mah
Draft

[Aikido] Fix 4 security issues in fonttools, scipy#25
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-109452118-8mah

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Sep 9, 2026

Copy link
Copy Markdown

Upgrade fonttools and scipy to fix path traversal, XML external entity injection, arbitrary file write, and memory safety vulnerabilities in font processing and scientific computing.

✅ Code not affected by breaking changes.

✅ No breaking changes affect this codebase.

fonttools (4.60.2 => 4.64.0): The package is listed in requirements.txt but is not imported or used anywhere in the Python code. It's likely a transitive dependency of matplotlib. The breaking changes (Python 3.9 drop, removal of Adobe SING tables, FieldSpec introduction) do not affect this codebase.

scipy (1.7.0 => 1.18.1): The codebase uses only scipy.fft.fft2, scipy.fft.ifft2, scipy.fft.fftshift, scipy.interpolate.RBFInterpolator, and scipy.interpolate.RegularGridInterpolator. None of these functions are mentioned in the extensive list of breaking changes. All deprecated/removed functions (like scipy.integrate.simps, scipy.interpolate.interp2d, scipy.stats.mode behavior changes, etc.) are not used in this codebase.

All breaking changes by upgrading fonttools from version 4.60.2 to 4.64.0 (CHANGELOG)

Version Description
4.61.0
Drop support for EOL Python 3.9
4.62.0
Remove defunct Adobe SING Glyphlet tables (META, SING, GMAP, GPKG)
4.63.0
Introduce FieldSpec dataclass for OpenType table schema definitions, replacing raw tuples in otData.py

All breaking changes by upgrading scipy from version 1.7.0 to 1.18.1 (CHANGELOG)

Version Description
1.10.0
scipy.stats.multivariate_normal will now raise a ValueError when the covariance matrix is not positive semidefinite, regardless of which method is called.
1.11.0
The default for the legacy keyword of scipy.special.comb has changed from True to False.
1.11.0
scipy.sparse.isspmatrix now only returns True for sparse matrices instances (not sparse arrays).
1.11.0
Sparse arrays constructed with int64 indices will no longer automatically downcast to int32.
1.11.0
In scipy.stats.mode, the default value of keepdims is now False, and support for non-numeric input has been removed.
1.11.0
The function scipy.signal.lsim does not support non-uniform time steps anymore.
1.11.0
The scipy.optimize.minimize function now raises an error for x0 with x0.ndim > 1.
1.11.0
The method Rotation.align_vectors when given a single pair of vectors now returns the rotation with minimal magnitude, which can be considered as a minor backward incompatible change.
1.12.0
The tol argument default value change and atol default value is due to change to 0.0 in SciPy 1.14 for scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk,gmres,lgmres,minres,qmr,tfqmr}.
1.13.0
Non-integer arrays in scipy.special.factorial with exact=True now raise an error.
1.14.0
Many scipy.stats functions now produce a standardized warning message when an input sample is too small (e.g. zero size). Previously, these functions may have raised an error, emitted one or more less informative warnings, or emitted no warnings.
1.14.0
Several previously deprecated methods for sparse arrays were removed: asfptype, getrow, getcol, get_shape, getmaxprint, set_shape, getnnz, and getformat. Additionally, the .A and .H attributes were removed.
1.14.0
scipy.integrate.{simps,trapz,cumtrapz} have been removed in favour of simpson, trapezoid, and cumulative_trapezoid.
1.14.0
The tol argument of scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk,mres,lgmres,minres,qmr,tfqmr} has been removed in favour of rtol. Furthermore, the default value of atol for these functions has changed to 0.0.
1.14.0
The restrt argument of scipy.sparse.linalg.gmres has been removed in favour of restart.
1.14.0
The initial_lexsort argument of scipy.stats.kendalltau has been removed.
1.14.0
The cond and rcond arguments of scipy.linalg.pinv have been removed.
1.14.0
The even argument of scipy.integrate.simpson has been removed.
1.14.0
The turbo and eigvals arguments from scipy.linalg.{eigh,eigvalsh} have been removed.
1.14.0
The legacy argument of scipy.special.comb has been removed.
1.14.0
The hz/nyq argument of signal.{firls, firwin, firwin2, remez} has been removed.
1.14.0
float128, float96, and object arrays now raise an error in scipy.signal.medfilt and scipy.signal.order_filter.
1.14.0
scipy.interpolate.interp2d has been replaced by an empty stub (to be removed completely in the future).
1.14.0
Positional use of keyword arguments now raises an error for affected functions: sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}, stats.kendalltau, linalg.pinv, integrate.simpson, linalg.{eigh,eigvalsh}, special.comb, signal.{firls, firwin, firwin2, remez}.
1.15.0
interpolate.BSpline.integrate output is now always a numpy array. Previously, for 1D splines the output was a python float or a 0D array depending on the value of the extrapolate argument.
1.15.0
scipy.stats.wilcoxon now respects the method argument provided by the user. Previously, even if method='exact' was specified, the function would resort to method='approx' in some cases.
1.15.0
scipy.integrate.AccuracyWarning has been removed as the functions the warning was emitted from (scipy.integrate.quadrature and scipy.integrate.romberg) have been removed.
1.15.0
The wavelet functions in scipy.signal have been removed: daub, qmf, cascade, morlet, morlet2, ricker, and cwt. Users should use pywavelets instead.
1.15.0
scipy.signal.cmplx_sort has been removed.
1.15.0
scipy.integrate.quadrature and scipy.integrate.romberg have been removed in favour of scipy.integrate.quad.
1.15.0
scipy.stats.rvs_ratio_uniforms has been removed in favor of scipy.stats.sampling.RatioUniforms.
1.15.0
scipy.special.factorial now raises an error for non-integer scalars when exact=True.
1.15.0
scipy.integrate.cumulative_trapezoid now raises an error for values of initial other than 0 and None.
1.15.0
Complex dtypes now raise an error in scipy.interpolate.Akima1DInterpolator and scipy.interpolate.PchipInterpolator.
1.15.0
special.btdtr and special.btdtri have been removed.
1.15.0
The default of the exact= kwarg in special.factorialk has changed from True to False.
1.15.0
All functions in the scipy.misc submodule have been removed.
1.15.0
Sparse arrays and matrices may now raise errors when initialized with incompatible data types, such as float16.
1.16.0
Several of the scipy.linalg functions for solving a linear system now treat many-dimensional right hand sides according to the rules specified in the batch processing guide, whereas previously they may not have raised an error for RHS arguments with more than two dimensions.
1.16.0
scipy.stats.bootstrap now explicitly broadcasts elements of data to the same shape (ignoring axis) before performing the calculation.
1.16.0
Several submodule names are no longer available via from scipy.signal import *, but may still be imported directly.
1.16.0
scipy.sparse.conjtransp has been removed. Use .T.conj() instead.
1.16.0
The quadrature='trapz' option has been removed from scipy.integrate.quad_vec, and scipy.stats.trapz has been removed. Use trapezoid in both instances instead.
1.16.0
scipy.special.comb and scipy.special.perm now raise when exact=True and arguments are non-integral.
1.16.0
Support for inference of the two sets of measurements from the single argument x has been removed from scipy.stats.linregress. The data must be specified separately as x and y.
1.16.0
Support for NumPy masked arrays has been removed from scipy.stats.power_divergence and scipy.stats.chisquare.
1.16.0
The lm method of scipy.optimize.least_squares now has a different behavior for the maximum number of function evaluations, max_nfev. The default is changed to 100 * n, and the number of function calls used in Jacobian approximation is no longer included in OptimizeResult.nfev.
1.17.0
The resulting shapes for transform.Rotation.from_euler and from_davenport have changed to make them consistent with broadcasting rules. Angle inputs to Euler angles must now strictly match the number of provided axes in the last dimension. The resulting Rotation has the shape np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must also match the number of axes in the last dimension. The resulting Rotation has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).
1.18.0
The output of scipy.stats.rankdata is now always of a floating point dtype -- the result dtype of the input and a Python float.
1.18.0
The behavior of the residuals returned by scipy.linalg.lstsq has been changed. For lapack_driver == "gelsy" or the system being either underdetermined or square, empty residuals are still returned. For lapack_driver == "gesld"/"gelss" in combination with an overdetermined system a non-empty residual is always returned. However, in the case where a slice is not full column rank, the corresponding residual is set to NaN.
1.18.0
The 2nd output object of scipy.stats.contingency.crosstab when kwarg sparse=True is now a sparse array holding the counts instead of a sparse matrix. This allows it to be nD, so can accept more than 2 sequences as inputs, but it is a different class.
1.18.0
scipy.stats.obrientransform now returns a tuple of arrays instead of a single ndarray.
1.18.0
scipy.stats.multinomial now returns NaNs when the category probability (p) rows/arrays do not sum to unity. This is an expiration of the deprecated behavior of adjusting the final element in the p array to compensate. Note that multinomial.rvs will now raise an error in such cases, since it has an integral return type.
1.18.0
The iprint and disp parameters of scipy.optimize.fmin_l_bfgs_b have been removed, following the expiry of their deprecation.
1.18.0
For scipy.linalg.{sqrtm, logm, signm}, disp (and sqrtm blocksize) parameters were removed (expired deprecations).
1.18.0
The deprecated atol argument of scipy.optimize.nnls has been removed.
1.18.0
For 2D input, the return type of scipy.linalg.bandwidth has changed from (int, int) to (np.int64, np.int64).
1.18.0
The second return type of scipy.linalg.cho_factor changed from bool to NDArray[np.bool].
1.18.0
The second return type of scipy.interpolate.splint changed from a 1D float64 array to None when full_output=True.
1.18.0
The types of the k and n attributes of the BinomTestResult object returned by scipy.stats.binomtest have changed from int to np.float64.
1.18.0
Previously, return values of scipy.linalg.eig were always Fortran-ordered, and in SciPy 1.18.0 they may or may not be. If the ordering is important (for example, when interfacing with compiled code which expects specific array strides), users should ensure the desired ordering manually.
1.8.0
SciPy has raised the minimum compiler versions to GCC 6.3 on linux and VS2019 on windows. In particular, this means that SciPy may now use C99 and C++14 features.
1.8.0
The result for empty bins for scipy.stats.binned_statistic with the builtin 'std' metric is now nan, for consistency with np.std.
1.8.0
The function scipy.spatial.distance.wminkowski has been removed. To achieve the same results as before, please use the minkowski distance function with the (optional) w= keyword-argument for the given weight.
1.9.0
Several scipy.stats functions now convert np.matrix to np.ndarrays before calculation, returning scalars or np.ndarrays instead of 2D np.matrix. Masked array outputs are now scalars or np.ndarray rather than masked arrays with mask=False.
1.9.0
The default method of scipy.optimize.linprog changed from 'interior-point' to 'highs', causing callback functions and some options to no longer be supported with the default method. The x attribute of the returned OptimizeResult is now None instead of a non-optimal array when an optimal solution cannot be found.
1.9.0
For scipy.stats.combine_pvalues, the sign of the test statistic for the "pearson" method has been flipped so higher values correspond to lower p-values.
1.9.0
scipy.linalg.expm no longer accepts sparse arrays and only works with nDarrays. For sparse usage, scipy.sparse.linalg.expm must be used explicitly.
1.9.0
The definition of scipy.stats.circvar has reverted to the standard literature definition, which is not the same as the square of scipy.stats.circstd.
1.9.0
Removed inheritance to QMCEngine in MultinomialQMC and MultivariateNormalQMC, removing the methods fast_forward and reset.
1.9.0
Init of MultinomialQMC now requires the number of trials with n_trials, and MultinomialQMC.random output shape has changed to (n, pvals).
1.9.0
stats.mode now consumes the input axis and returns an ndarray with the axis dimension removed, fixing previous behavior where the axis wasn't consumed and negative axis inputs failed.
1.9.0
Object arrays in sparse matrices now raise an error (expired deprecation).
1.9.0
Inexact indices into sparse matrices now raise an error (expired deprecation).
1.9.0
Passing radius=None to scipy.spatial.SphericalVoronoi now raises an error (expired deprecation).
1.9.0
Several BSpline methods now raise an error if inputs have ndim > 1 (expired deprecation).
1.9.0
The _rvs method of statistical distributions now requires a size parameter (expired deprecation).
1.9.0
Passing a fillvalue that cannot be cast to the output type in scipy.signal.convolve2d now raises an error (expired deprecation).
1.9.0
scipy.spatial.distance now enforces that input vectors are one-dimensional (expired deprecation).
1.9.0
Removed stats.itemfreq (expired deprecation).
1.9.0
Removed stats.median_absolute_deviation (expired deprecation).
1.9.0
Removed n_jobs keyword argument and use of k=None from kdtree.query (expired deprecation).
1.9.0
Removed right keyword from interpolate.PPoly.extend (expired deprecation).
1.9.0
Removed debug keyword from scipy.linalg.solve_* (expired deprecation).
1.9.0
Removed class _ppform from scipy.interpolate (expired deprecation).
1.9.0
Removed BSR methods matvec and matmat (expired deprecation).
1.9.0
Removed mlab truncation mode from cluster.dendrogram (expired deprecation).
1.9.0
Removed cluster.vq.py_vq2 (expired deprecation).
1.9.0
Removed keyword arguments ftol and xtol from optimize.minimize(method='Nelder-Mead') (expired deprecation).
1.9.0
Removed signal.windows.hanning (expired deprecation).
1.9.0
Removed LAPACK gegv functions from linalg, raising the minimally required LAPACK version to 3.7.1 (expired deprecation).
1.9.0
Removed spatial.distance.matching (expired deprecation).
1.9.0
Removed the alias scipy.random for numpy.random (expired deprecation).
1.9.0
Removed docstring related functions from scipy.misc (expired deprecation).
1.9.0
Removed linalg.pinv2 (expired deprecation).
1.9.0
Minimum required LAPACK version bumped to 3.7.1.
1.9.0
This release requires Python 3.8-3.11 and NumPy 1.18.5 or greater.
✅ 4 CVEs resolved by this upgrade

This PR will resolve the following CVEs:

Issue Severity           Description
AIKIDO-2026-390308
MEDIUM
[fonttools] Path traversal vulnerability in the filesystem module allows arbitrary file read and creation through malicious UFO sources using .. components in paths, enabling attackers to access files outside the intended directory when processing untrusted fonts.
AIKIDO-2026-755272
MEDIUM
[fonttools] XML external entity (XXE) processing vulnerability in the etree wrapper allows parsing of untrusted XML files (TTX, designspace, plist) to read local files through unresolved external entities. This can lead to information disclosure of sensitive local file contents.
AIKIDO-2026-853949
MEDIUM
[fonttools] A path traversal vulnerability in bitmap export functionality allows crafted glyph names to write files outside the intended directory, enabling arbitrary file writes and potential code execution when processing untrusted fonts.
AIKIDO-2026-950571
MEDIUM
[scipy] Multiple memory safety defects in C extensions cause use-after-free, double-free, and buffer overflow vulnerabilities in FITPACK spline functions, ODE integration, and signal processing, potentially leading to crashes or code execution. Fixes include proper reference counting, NULL checks, and input validation.
🔗 Related Tasks

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

REM-3112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants