Skip to content
Misconfiguration Disclosed report Advanced CVE-2023-23920

Insecure loading of ICU data through ICU_DATA environment variable

ICU honours the ICU_DATA environment variable even when running with elevated privileges, unlike Node.js which ignores NODE_ICU_DATA in that case. An attacker who can set environment variables could load crafted ICU data files, though the report notes the real-world impact is probably not much worse than using the documented --icu-data-dir flag.

bnoordhuis Follow

Originally disclosed on HackerOne

  • Triaged in 9 hours
  • Fixed in 7 months
  • Disclosed after 8 months

Node.js correctly ignores the NODE_ICU_DATA environment variable when it is running with elevated privileges (e.g. setuid root).

ICU on the other hand still honors the ICU_DATA environment variable, without regard for privilege level.

Impact

ICU is not very resilient to crafted data files but since users can select custom data files anyway with the --icu-data-dir flag, the real-world impact is probably not much worse than what is already possible through documented means...

...which doesn't mean it shouldn't be fixed because scenarios where it is in fact exploitable are imaginable, just not very likely.

Suggestions:

  • build ICU with ICU_NO_USER_DATA_OVERRIDE defined
  • sanitize the environment before initializing ICU

The original report as published on HackerOne, by bnoordhuis. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely ICU does not check whether the process is running with elevated privileges before honouring the ICU_DATA environment variable, unlike Node.js which ignores its equivalent variable in that case.

Impact

An attacker who can control the environment could load crafted ICU data files into a privileged process, though the report says the real-world impact is probably not much worse than what the documented --icu-data-dir flag already allows and that exploitable scenarios are imaginable but not very likely.

What the attacker needed

Ability to set ICU_DATA in the environment; process runs with elevated privileges

The fix

ICU should be built with ICU_NO_USER_DATA_OVERRIDE defined, or the environment should be sanitised before ICU is initialised.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Some programs can run with extra permissions, like a root-owned tool that ordinary users are allowed to launch. When such a program starts, it should ignore settings that an ordinary user could tamper with, because those settings could make it load malicious files. Here, a library called ICU still reads a setting called ICU_DATA even in that privileged situation, so a user might be able to feed it a crafted data file.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by bnoordhuis

View all

1 more disclosed report, best first.

More from Node.js

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.