[Aikido] Fix 4 security issues in fonttools, scipy - #25
Draft
aikido-autofix[bot] wants to merge 1 commit into
Draft
[Aikido] Fix 4 security issues in fonttools, scipy#25aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andscipy.interpolate.RegularGridInterpolator. None of these functions are mentioned in the extensive list of breaking changes. All deprecated/removed functions (likescipy.integrate.simps,scipy.interpolate.interp2d,scipy.stats.modebehavior changes, etc.) are not used in this codebase.All breaking changes by upgrading fonttools from version 4.60.2 to 4.64.0 (CHANGELOG)
META,SING,GMAP,GPKG)FieldSpecdataclass for OpenType table schema definitions, replacing raw tuples inotData.pyAll breaking changes by upgrading scipy from version 1.7.0 to 1.18.1 (CHANGELOG)
scipy.stats.multivariate_normalwill now raise aValueErrorwhen the covariance matrix is not positive semidefinite, regardless of which method is called.legacykeyword ofscipy.special.combhas changed fromTruetoFalse.scipy.sparse.isspmatrixnow only returnsTruefor sparse matrices instances (not sparse arrays).scipy.stats.mode, the default value ofkeepdimsis nowFalse, and support for non-numeric input has been removed.scipy.signal.lsimdoes not support non-uniform time steps anymore.scipy.optimize.minimizefunction now raises an error forx0withx0.ndim > 1.Rotation.align_vectorswhen given a single pair of vectors now returns the rotation with minimal magnitude, which can be considered as a minor backward incompatible change.tolargument default value change andatoldefault value is due to change to0.0in SciPy 1.14 forscipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk,gmres,lgmres,minres,qmr,tfqmr}.scipy.special.factorialwithexact=Truenow raise an error.scipy.statsfunctions 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.asfptype,getrow,getcol,get_shape,getmaxprint,set_shape,getnnz, andgetformat. Additionally, the.Aand.Hattributes were removed.scipy.integrate.{simps,trapz,cumtrapz}have been removed in favour ofsimpson,trapezoid, andcumulative_trapezoid.tolargument ofscipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk,mres,lgmres,minres,qmr,tfqmr}has been removed in favour ofrtol. Furthermore, the default value ofatolfor these functions has changed to0.0.restrtargument ofscipy.sparse.linalg.gmreshas been removed in favour ofrestart.initial_lexsortargument ofscipy.stats.kendalltauhas been removed.condandrcondarguments ofscipy.linalg.pinvhave been removed.evenargument ofscipy.integrate.simpsonhas been removed.turboandeigvalsarguments fromscipy.linalg.{eigh,eigvalsh}have been removed.legacyargument ofscipy.special.combhas been removed.hz/nyqargument ofsignal.{firls, firwin, firwin2, remez}has been removed.float128,float96, and object arrays now raise an error inscipy.signal.medfiltandscipy.signal.order_filter.scipy.interpolate.interp2dhas been replaced by an empty stub (to be removed completely in the future).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}.interpolate.BSpline.integrateoutput 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 theextrapolateargument.scipy.stats.wilcoxonnow respects themethodargument provided by the user. Previously, even ifmethod='exact'was specified, the function would resort tomethod='approx'in some cases.scipy.integrate.AccuracyWarninghas been removed as the functions the warning was emitted from (scipy.integrate.quadratureandscipy.integrate.romberg) have been removed.scipy.signalhave been removed:daub,qmf,cascade,morlet,morlet2,ricker, andcwt. Users should usepywaveletsinstead.scipy.signal.cmplx_sorthas been removed.scipy.integrate.quadratureandscipy.integrate.romberghave been removed in favour ofscipy.integrate.quad.scipy.stats.rvs_ratio_uniformshas been removed in favor ofscipy.stats.sampling.RatioUniforms.scipy.special.factorialnow raises an error for non-integer scalars whenexact=True.scipy.integrate.cumulative_trapezoidnow raises an error for values ofinitialother than0andNone.scipy.interpolate.Akima1DInterpolatorandscipy.interpolate.PchipInterpolator.special.btdtrandspecial.btdtrihave been removed.exact=kwarg inspecial.factorialkhas changed fromTruetoFalse.scipy.miscsubmodule have been removed.float16.scipy.linalgfunctions 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.scipy.stats.bootstrapnow explicitly broadcasts elements ofdatato the same shape (ignoringaxis) before performing the calculation.from scipy.signal import *, but may still be imported directly.scipy.sparse.conjtransphas been removed. Use.T.conj()instead.quadrature='trapz'option has been removed fromscipy.integrate.quad_vec, andscipy.stats.trapzhas been removed. Usetrapezoidin both instances instead.scipy.special.combandscipy.special.permnow raise whenexact=Trueand arguments are non-integral.xhas been removed fromscipy.stats.linregress. The data must be specified separately asxandy.scipy.stats.power_divergenceandscipy.stats.chisquare.lmmethod ofscipy.optimize.least_squaresnow has a different behavior for the maximum number of function evaluations,max_nfev. The default is changed to100 * n, and the number of function calls used in Jacobian approximation is no longer included inOptimizeResult.nfev.transform.Rotation.from_eulerandfrom_davenporthave 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 resultingRotationhas the shapenp.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must also match the number of axes in the last dimension. The resultingRotationhas the shapenp.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).scipy.stats.rankdatais now always of a floating point dtype -- the result dtype of the input and a Pythonfloat.residualsreturned byscipy.linalg.lstsqhas been changed. Forlapack_driver == "gelsy"or the system being either underdetermined or square, empty residuals are still returned. Forlapack_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 toNaN.scipy.stats.contingency.crosstabwhen kwargsparse=Trueis 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.scipy.stats.obrientransformnow returns a tuple of arrays instead of a singlendarray.scipy.stats.multinomialnow 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 theparray to compensate. Note thatmultinomial.rvswill now raise an error in such cases, since it has an integral return type.iprintanddispparameters ofscipy.optimize.fmin_l_bfgs_bhave been removed, following the expiry of their deprecation.scipy.linalg.{sqrtm, logm, signm},disp(andsqrtmblocksize) parameters were removed (expired deprecations).atolargument ofscipy.optimize.nnlshas been removed.scipy.linalg.bandwidthhas changed from(int, int)to(np.int64, np.int64).scipy.linalg.cho_factorchanged frombooltoNDArray[np.bool].scipy.interpolate.splintchanged from a 1Dfloat64array toNonewhenfull_output=True.kandnattributes of theBinomTestResultobject returned byscipy.stats.binomtesthave changed frominttonp.float64.scipy.linalg.eigwere always Fortran-ordered, and in SciPy1.18.0they 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.scipy.stats.binned_statisticwith the builtin'std'metric is nownan, for consistency withnp.std.scipy.spatial.distance.wminkowskihas been removed. To achieve the same results as before, please use theminkowskidistance function with the (optional)w=keyword-argument for the given weight.scipy.statsfunctions now convertnp.matrixtonp.ndarrays before calculation, returning scalars ornp.ndarrays instead of 2Dnp.matrix. Masked array outputs are now scalars ornp.ndarrayrather than masked arrays withmask=False.scipy.optimize.linprogchanged from'interior-point'to'highs', causing callback functions and some options to no longer be supported with the default method. Thexattribute of the returnedOptimizeResultis nowNoneinstead of a non-optimal array when an optimal solution cannot be found.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.scipy.linalg.expmno longer accepts sparse arrays and only works with nDarrays. For sparse usage,scipy.sparse.linalg.expmmust be used explicitly.scipy.stats.circvarhas reverted to the standard literature definition, which is not the same as the square ofscipy.stats.circstd.QMCEngineinMultinomialQMCandMultivariateNormalQMC, removing the methodsfast_forwardandreset.MultinomialQMCnow requires the number of trials withn_trials, andMultinomialQMC.randomoutput shape has changed to(n, pvals).stats.modenow consumes the input axis and returns an ndarray with theaxisdimension removed, fixing previous behavior where the axis wasn't consumed and negative axis inputs failed.radius=Nonetoscipy.spatial.SphericalVoronoinow raises an error (expired deprecation).ndim > 1(expired deprecation)._rvsmethod of statistical distributions now requires asizeparameter (expired deprecation).fillvaluethat cannot be cast to the output type inscipy.signal.convolve2dnow raises an error (expired deprecation).scipy.spatial.distancenow enforces that input vectors are one-dimensional (expired deprecation).stats.itemfreq(expired deprecation).stats.median_absolute_deviation(expired deprecation).n_jobskeyword argument and use ofk=Nonefromkdtree.query(expired deprecation).rightkeyword frominterpolate.PPoly.extend(expired deprecation).debugkeyword fromscipy.linalg.solve_*(expired deprecation)._ppformfromscipy.interpolate(expired deprecation).matvecandmatmat(expired deprecation).mlabtruncation mode fromcluster.dendrogram(expired deprecation).cluster.vq.py_vq2(expired deprecation).ftolandxtolfromoptimize.minimize(method='Nelder-Mead')(expired deprecation).signal.windows.hanning(expired deprecation).gegvfunctions fromlinalg, raising the minimally required LAPACK version to 3.7.1 (expired deprecation).spatial.distance.matching(expired deprecation).scipy.randomfornumpy.random(expired deprecation).scipy.misc(expired deprecation).linalg.pinv2(expired deprecation).✅ 4 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
..components in paths, enabling attackers to access files outside the intended directory when processing untrusted fonts.🔗 Related Tasks