Update dependency fonttools to v4.43.0 [SECURITY] - #541
Closed
renovate[bot] wants to merge 1 commit into
Closed
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Vulnerable Libraries (12)
More info on how to fix Vulnerable Libraries in Python. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |
|
Stale pull request message |
Author
Renovate Ignore NotificationBecause you closed this PR without merging, Renovate will ignore this update ( If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR. |
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.
This PR contains the following updates:
==4.28.2->==4.43.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
CVE-2023-45139
Summary
As of
fonttools>=4.28.2the subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed.This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system.
PoC
The vulnerability can be reproduced following the bellow steps on a unix based system.
/etc/passwdfor our POC file to include and modified an existing subset integration test to build the POC font - see bellow.fonttools==4.42.1andfonttools==4.28.2- using the following flags (which just ensure the malicious glyph is mapped by the font and not discard in the subsetting process):ttx -t SVG poc-payload.subset.ttf && cat poc-payload.subset.ttxObserved the included contents of the
/etc/passwdfile.Impact
Note the final severity is dependant on the environment fontTools is running in.
Possible Mitigations
There may be other ways to mitigate the issue, but some suggestions:
resolve_entities=Falseflag on parsing methodsRelease Notes
fonttools/fonttools (fonttools)
v4.43.0Compare Source
XMLParser(resolve_entities=False)when parsing OT-SVG documents to prevent XML External Entity (XXE) attacks (9f61271): https://codeql.github.com/codeql-query-help/python/py-xxe/iup_delta_optimizethat was leading to IUP tolerance being incorrectly initialised, resulting in sub-optimal deltas (6012643, cython/cython#5732).fonttools varLib.avarto add anavartable to an existing VF from axes mappings in a .designspace file (0a3360e).v4.42.1Compare Source
457f11c).addMultilingualNameandttFontparameter was not passed on tofindMultilingualName(#3253).v4.42.0Compare Source
v4.41.1Compare Source
NameRecordVisitoronly visit tables that do contain nameID references (#3213, #3214).CursivePosmasters (#3209).v4.41.0Compare Source
removeUnusedNameRecordsin the user range (#3185)._add_avar()call site (#3183).voltLib.voltToFeasubmodule (originally Tiro Typeworks' "Volto") for converting VOLT OpenType Layout sources to FEA format (#3164).v4.40.0Compare Source
pip install --no-binary=fonttools fonttoolsto expliclity request pip to install from the pure-python source.avar2table from those (#3123).Added
quantizationoption (#3126).v4.39.4Compare Source
v4.39.3Compare Source
seekablemethod was only added in python 3.11 (https://github.com/fonttools/fonttools/issues/3052).v4.39.2Compare Source
NOTE: The 4.39.1 distribution was "yanked" from PyPI to prevent users from accidentally upgrading to it.
v4.39.1Compare Source
https://github.com/harfbuzz/boring-expansion-spec/blob/main/avar2.md
STATtable that was built with feaLib from FEA feature file. Also, added support for building multiple VFs defined in Designspace v5 fromfonttools varLibscript (https://github.com/fonttools/fonttools/pull/3024).Debgtable with lookup names whenFONTTOOLS_LOOKUP_DEBUGGINGenv variable is set (https://github.com/fonttools/fonttools/pull/3023).v4.39.0Compare Source
Debgdebug info for MTI feature builds (#3018).-character, similar to existing-o -option to write output to standard output (#3020).cython.compiledraise AttributeError if cython not installed properly (#3017).debugparameter to addOpenTypeFeatures method to add source debugging information to the font in theDebgprivate table (#3008).__lt__comparison not fail on Unicode encoding errors (#3006).overlayBox(#3003, #3005).https://github.com/harfbuzz/boring-expansion-spec/blob/main/glyf1-cubicOutlines.md
https://github.com/harfbuzz/boring-expansion-spec/blob/main/glyf1-varComposites.md.
addVarComponentmethod to pen protocols' base classes, which pens can implement to handle varcomponents (by default they get decomposed).__getstate__for BaseTable so that a copied/pickled 'lazy' object gets its own OTTableReader to read from; incidentally fixes a bug while subsetting COLRv1 table containing ClipBoxes on python 3.11 (#2965, #2968).endPointsOfContoursfield should be unsigned! Kudos to behdad for spotting one of the oldest bugs in FT. Probably nobody has ever dared to make glyphs with more than 32767 points... (#2957).ignorestatements with unmarked glyphs to match makeotf behavior, which assumes the first glyph is marked (#2950).blackand enforce new code style via CI check (#2925).v4.38.0Compare Source
It's now also possible to restrict an axis min/max values beyond the current default value, e.g. a font wght has min=100, def=400, max=900 and you want a partial VF that only varies between 500 and 700, you can now do that. You can either specify two min/max values (wght=500:700), and the new default will be set to either the minimum or maximum, depending on which one is closer to the current default (e.g. 500 in this case). Or you can specify three values (e.g. wght=500:600:700) to set the new default value explicitly.
Add optional extrapolate=False to normalizeLocation() (#2847, #2849).
v4.37.4Compare Source
v4.37.3Compare Source
v4.37.2Compare Source
--no-lazyto optionally load fonts eagerly (mostly to ease debugging of table lazy loading, no practical effects) (https://github.com/fonttools/fonttools/pull/2807).VarScalarby caching models for recurring master locations (https://github.com/fonttools/fonttools/pull/2798).feaLib.lexer, speeds up parsing FEA a bit (https://github.com/fonttools/fonttools/pull/2799).postlegacy format 1 is malformed/improperly used (https://github.com/fonttools/fonttools/pull/2786)normalizeLocationmethod to normalize a location dict from the font's defined axes space (also known as "user space") into the normalized (-1..+1) space. It appliesavarmapping if the font contains anavartable (https://github.com/fonttools/fonttools/pull/2789).statShape.pyscript to draw statistical shape of a glyph as an ellips (requires pycairo) (fonttools/fonttools@baecd88).v4.37.1Compare Source
HVARandVVARtables, whereby anAttributeError: subset_varidxeswas thrown because an apparently unused import statement (with the side-effect of dynamically binding thatsubset_varidxesmethod to the VarStore class) had been accidentally deleted in an unrelated PR (#2769, #2773).cairoPen(#2768).gvarmore lazily by not parsing all of theglyftable (#2771).drawPoints(pointPen)method work for CFF fonts as well via adapter pen (#2770).v4.37.0Compare Source
It will be restored in upcoming release once we found a solution to the bug.
blendoperator (https://github.com/fonttools/fonttools/pull/2750, https://github.com/fonttools/fonttools/issues/1975)._TTVarGlyphSetinherits from_TTGlyphSetto keep backward compatibility with existing API (https://github.com/fonttools/fonttools/pull/2762).fontTools.misc.visitorandfontTools.ttLib.ttVisitor. AddedfontTools.ttLib.scaleUpemmodule that uses the latter to change a font's units-per-em and scale all the related fields accordingly (https://github.com/fonttools/fonttools/pull/2718, https://github.com/fonttools/fonttools/pull/2755).v4.36.0Compare Source
The simpler algorithm produces fewer overlapping regions and behaves better with respect to rounding at the peak positions than the generic solver, always matching intermediate masters exactly, instead of maximally 0.5 units off. This may be useful when 100% metrics compatibility is desired (#2218, #2717).
GDEFnot being built when explicitly not requested; don't build one unconditonally even when not requested (#2744, also works around #2747).TTFont.getGlyphSetmethod now supports selecting a location that represents an instance of a variable font (supports both user-scale and normalized axes coordinates via thenormalized=Falseparameter). Currently this only works for TrueType-flavored variable fonts (#2738).v4.35.0Compare Source
_instantiateFeatureVariationswhen at the same time pinning one axis and restricting the range of a subsequent axis; the wrong axis tag was being used in the latter step (as the records' axisIdx was updated in the preceding step but looked up using the old axes order in the following step) (#2733, #2734).'.'instead of'#'in duplicate glyph names (#2742).build_many, we forgot to pass oncolr_layer_reuseparameter to thebuildmethod (#2730).6df779f).2963fa5).glyphsLib).varLib.iup(35% faster),pens.momentsPen(makesvarLib.interpolatable3x faster).AttributeErrorwhen uharfbuzz < 0.23.0 andrepackmethod is missing (32aa8ea).Use new
uharfbuzz.repack_with_tagwhen available (since uharfbuzz>=0.30.0), enables table-specific optimizations to be performed during repacking (#2724).4139d89). Avoid division-by-zero (52b28f9).NotANonevariable (#2714).v4.34.4Compare Source
v4.34.3Compare Source
v4.34.2Compare Source
a08140d).v4.34.1Compare Source
v4.34.0Compare Source
Base color glyphs of same name in different masters must have identical paint graph structure (incl. number of layers, palette indices, number of color line stops, corresponding paint formats at each level of the graph), but can differ in the variable fields (e.g. PaintSolid.Alpha). PaintVar* tables are produced when this happens and a VarStore/DeltaSetIndexMap is added to the variable COLR table. It is possible for non-default masters to be 'sparse', i.e. omit some of the color glyphs present in the default master.
compressedfield, and no longer a bare 3-tuple (#2645).Updated how table packing falls back to fontTools from harfbuzz (#2668).
v4.33.3Compare Source
deepcopyExceptFontsmethod, preventing font references to be transferred (#2600).Fixed another typo in the name of
Rangedataclass's__post_init__magic method (#2597).v4.33.2Compare Source
Do not exit at the first failure but continue attempting to fix offset overflow error using the pure-python serializer even when the
USE_HARFBUZZ_REPACKERoption was explicitly set toTrue. This is normal with fonts with relatively large tables, at least until hb.repack implements proper table splitting.v4.33.1Compare Source
FONTTOOLS_GPOS_COMPACT_MODEenvironment variable to fix regression in ufo2ft (and thus fontmake) introduced with v4.33.0 (#2592, #2593).This is deprecated and will be removed once ufo2ft gets updated to use the new config setup.
v4.33.0Compare Source
OS/2.xAvgCharWidthafter merging fonts withfontTools.merge(#2591, #2538).fontTools.misc.configToolsmodule, a generic configuration system (#2416, #2349).Added
fontTools.configmodule, a fontTools-specific configuration system usingconfigToolsabove.Attached a
Configobject toTTFont.Added discrete axes, variable fonts, STAT information, either design- or user-space location on instances.
Added
fontTools.designspaceLib.splitmodule to split a designspace into sub-spaces that interpolate and that represent the variable fonts listed in the document.Made instance names optional and allow computing them from STAT data instead.
Added
fontTools.designspaceLib.statNamesmodule.Allow instances to have the same location as a previously defined STAT label.
Deprecated some attributes:
SourceDescriptor:copyLib,copyInfo,copyGroups,copyFeatures.InstanceDescriptor:kerning,info;glyphs: use rules or sparse sources.For both,
location: use the more explicit designLocation.Note: all are soft deprecations and existing code should keep working.
Updated documentation for Python methods and the XML format.
build_manyto build several variable fonts from a single designspace document (#2436).Added
fontTools.varLib.statmodule to build STAT tables from a designspace document.uharfbuzzpython bindings are available (#2552). Disable it by setting the "fontTools.ttLib.tables.otBase:USE_HARFBUZZ_REPACKER" config option toFalse. If the option is set explicitly toTruebutuharfbuzzcan't be imported or fails to serialize for any reasons, an error will be raised (ImportError or uharfbuzz errors).pen.closePath()gets called for CFF2 charstrings (#2577).Handle implicit CFF2 closePath within
T2OutlineExtractor(#2580).v4.32.0Compare Source
outputImpliedClosingLine=Falseparameter toGlyph.draw(), to control behaviour ofPointToSegmentPen(6b4e2e7).GlobalStateclass and fix calls toTopDictIndex()(#2569, #2570).AxisValueArrayif it is empty after instantiating (#2563).v4.31.2Compare Source
v4.31.1Compare Source
<svg>element (#2553).v4.31.0Compare Source
ensureDecompiledmethod to load all tables irrespective of thelazyattribute (#2551).iterSubTablemethod to iterate over BaseTable's children of type BaseTable; useful for traversing a tree of otTables (#2551).v4.30.0Compare Source
gvaris built (#2542).FoundANoneandUnsupportedFormatexceptions (ac4d561).windowsNamesandmacNames(bool) parameters to thebuildStatTablefunction, so that one can select whether to only add one or both of the two sets (#2528).getFirstDebugName,getBest{Family,SubFamily,Full}Namemethods (#2526).v4.29.1Compare Source
v4.29.0Compare Source
waitForKeyPressmethod on Windows (#2509).freetype-pyand the pen protocol for rasterizating outline paths (#2494).Bumped unicodedata2 dependency to 14.0 (#2499).
fontNameinsuckfont(#2496).v4.28.5Compare Source
str()are now replaced with user-definedntoscallable.Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.