CVE-2017-9246 New Relic .NET Agent contains SQL Injection

Critical 9.8 Published Updated

The New Relic .NET Agent fails to escape quotes in SQL queries, allowing attackers to inject malicious SQL code when the Slow Queries feature is enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-9246?

CVE-2017-9246 is a critical SQL injection vulnerability in n/a, published on 13 Jun 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

New Relic .NET Agent before 6.3.123.0 adds SQL injection flaws to safe applications via vectors involving failure to escape quotes during use of the Slow Queries feature, as demonstrated by a mishandled quote in a VALUES clause of an INSERT statement, after bypassing a SET SHOWPLAN_ALL ON protection mechanism.

Weakness: CWE-89

Which versions are affected by CVE-2017-9246?

2 open source packages ship an affected version, including NewRelic.Agent. It affects 1 product.

PackageAffectedFixed in
NewRelic.Agent NuGetAll versions6.3.123.0
NewRelic.Agent NuGetAll versions6.3.123.0

Products include Newrelic .Net Agent.

How do I fix CVE-2017-9246?

Upgrade NewRelic.Agent to 6.3.123.0 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2017-9246 being exploited?

There is no known exploitation of CVE-2017-9246 in the wild and no public exploit code.

Sources

Also known as GHSA-2rvx-cvfc-mcp2.

Is CVE-2017-9246 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free