Miggo Logo

CVE-2025-11573: Amazon.IonDotnet is vulnerable to Denial of Service attacks

N/A

CVSS Score

Basic Information

EPSS Score
-
Published
10/9/2025
Updated
10/9/2025
KEV Status
No
Technology
TechnologyC#

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
Amazon.IonDotnetnuget< 1.3.21.3.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a Denial of Service in the Amazon.IonDotnet library, caused by infinite loops when parsing malformed Ion text. The root cause is the improper handling of unexpected End-Of-File (EOF) conditions within parsing functions for blobs and various string types.

The analysis of the patch commit edaff75fe5abbb71e647bed812c608c0c5e2fbab reveals that the file Amazon.IonDotnet/Internals/Text/TextScanner.cs was modified to fix these issues. The changes consistently involve adding or correcting EOF checks inside while(true) loops within functions responsible for parsing or skipping over specific Ion data types.

Specifically, the functions LoadBlob, SkipOverBlob, SkipTripleQuotedString, SkipSingleQuotedString, and SkipDoubleQuotedString were modified. Before the patch, if a specially crafted input caused a premature end to the data (e.g., an unterminated string or blob), the parsing loops in these functions would fail to terminate. The ReadChar() method would continuously return an EOF indicator, but the loop's exit condition would never be met, leading to 100% CPU utilization.

The patch addresses this by ensuring that an UnexpectedEofException is thrown whenever an EOF is encountered in an invalid position. This is achieved by replacing incorrect EOF constants and adding explicit checks after reading from the input stream, especially in edge cases like after an escape character. The identified functions are precisely where this faulty logic existed, and they would appear in a profiler's stack trace during an exploit.

Vulnerable functions

Amazon.IonDotnet.Internals.Text.TextScanner.LoadBlob
Amazon.IonDotnet/Internals/Text/TextScanner.cs
The function `LoadBlob` contains a `while(true)` loop to process blob data. Before the patch, the end-of-file (EOF) check was incorrect (`c == TextConstants.TokenEof`). Malformed input causing a premature EOF would not be handled correctly, leading to an infinite loop. The patch corrects the EOF constant to `CharacterSequence.CharSeqEof`, ensuring an exception is thrown instead.
Amazon.IonDotnet.Internals.Text.TextScanner.SkipOverBlob
Amazon.IonDotnet/Internals/Text/TextScanner.cs
Similar to `LoadBlob`, the `SkipOverBlob` function used an incorrect constant to check for the end of the file within a `while(true)` loop. This could cause an infinite loop if the input stream ended unexpectedly while skipping over a blob. The patch fixes the EOF check.
Amazon.IonDotnet.Internals.Text.TextScanner.SkipTripleQuotedString
Amazon.IonDotnet/Internals/Text/TextScanner.cs
This function, for skipping triple-quoted strings, lacked sufficient EOF checks, particularly after an escape character or when checking for the closing quotes. An unterminated triple-quoted string could cause `ReadChar()` to repeatedly return an EOF indicator without breaking the parsing loop, resulting in a denial of service. The patch adds explicit checks for `CharacterSequence.CharSeqEof` in multiple places within the loop.
Amazon.IonDotnet.Internals.Text.TextScanner.SkipSingleQuotedString
Amazon.IonDotnet/Internals/Text/TextScanner.cs
The `SkipSingleQuotedString` function's loop did not properly handle an EOF condition. If the input ended within a single-quoted string (e.g., no closing quote), the loop would continue indefinitely. The patch adds an explicit check for `CharacterSequence.CharSeqEof` to throw an exception in this case.
Amazon.IonDotnet.Internals.Text.TextScanner.SkipDoubleQuotedString
Amazon.IonDotnet/Internals/Text/TextScanner.cs
This function for skipping double-quoted strings was vulnerable to an infinite loop if an EOF was encountered after an escape character. The original code would read the character after the backslash without checking if it was an EOF. The patch adds this missing check to prevent the infinite loop.

WAF Protection Rules

WAF Rule

### Summ*ry *m*zon.Ion*otn*t is * li*r*ry *or t** *otn*t l*n*u*** t**t is us** to r*** *n* writ* *m*zon Ion **t*. *n issu* *xists w**r*, un**r **rt*in *ir*umst*n**s, t** li*r*ry *oul* *n in*init* loop, r*sultin* in **ni*l o* s*rvi**. *s o* *u*ust **,

Reasoning

T** vuln*r**ility is * **ni*l o* S*rvi** in t** `*m*zon.Ion*otn*t` li*r*ry, **us** *y in*init* loops w**n p*rsin* m*l*orm** Ion t*xt. T** root **us* is t** improp*r **n*lin* o* un*xp**t** *n*-O*-*il* (*O*) *on*itions wit*in p*rsin* *un*tions *or *lo*
CVE-2025-11573: Amazon IonDotnet Parser DoS | Miggo